diff --git a/sh/minutemaid b/sh/minutemaid index 76d7057..535e009 100755 --- a/sh/minutemaid +++ b/sh/minutemaid @@ -37,7 +37,7 @@ minutemaid() { ### @- o) offset="$OPTARG";; ?) local fd=0 [ $name = h ] && fd=1 || fd=2 - printf "%s\n" "usage: $0 [-o offset] {interval} [{command} [{args...}]]" >&$fd + printf '%s\n' "usage: $0 [-o offset] {interval} [{command} [{args...}]]" >&$fd [ $name = h ] && return 0 || return 1;; esac done @@ -46,8 +46,10 @@ minutemaid() { ### @- local interval="${1:?no interval specified}" shift - if [ "$interval" -le 0 ]; then - printf "%s\n" "$0: interval must be positive" >&2 + if [ "$interval" -gt 0 ] 2>/dev/null; then + : + else + printf "%s\n" "$0: interval must be a positive integer" >&2 return 1 fi