Error in the case of multiple positional arguments

break
noctuid 9 years ago
parent b472eda261
commit 702f047b6b

@ -114,9 +114,8 @@ done
shift "$((OPTIND-1))" shift "$((OPTIND-1))"
program=$1 program=$1
# ensure that positional argument exists if [[ $# -ne 1 ]]; then
if [[ -z $program ]]; then echo "Exactly 1 positional argument is required." \
echo "1 positional argument is required." \
"For help use -h or --help or see the manpage." | \ "For help use -h or --help or see the manpage." | \
tee -a /tmp/tdrop/log tee -a /tmp/tdrop/log
exit 1 exit 1

Loading…
Cancel
Save