From b4bb87fe9b20474292a2b3e9d7eb3a2bcd4e7554 Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Fri, 7 Feb 2014 07:27:46 -0500 Subject: [PATCH] Output errors to stderr --- binary_backups.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/binary_backups.sh b/binary_backups.sh index d69121d..1864e8b 100755 --- a/binary_backups.sh +++ b/binary_backups.sh @@ -68,7 +68,7 @@ while getopts "hrd:i:" OPTION; do i) input=$OPTARG if [[ ! -f $input ]]; then - echo "Error: \"$input\" is not a file" + echo "Error: \"$input\" is not a file" 1>&2 usage exit 1 fi @@ -76,7 +76,7 @@ while getopts "hrd:i:" OPTION; do d) current_date=$OPTARG if [[ $(invalid_date "$current_date") ]]; then - echo "Error: \"$current_date\" is not a valid date" + echo "Error: \"$current_date\" is not a valid date" 1>&2 usage exit 1 fi @@ -99,7 +99,7 @@ current_days=$(days_since_epoch "$current_date") while read line; do if [[ $(invalid_date "$line") ]]; then - echo "Error: \"$line\" is not a valid date" + echo "Error: \"$line\" is not a valid date" 1>&2 exit 1 fi backup_days=$(days_since_epoch "$line")