From 702f047b6bdcc33c0b2353f490104458a171c310 Mon Sep 17 00:00:00 2001 From: noctuid Date: Sat, 30 Jan 2016 02:45:57 -0500 Subject: [PATCH] Error in the case of multiple positional arguments --- tdrop | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tdrop b/tdrop index 1fbe4f4..f7c7128 100755 --- a/tdrop +++ b/tdrop @@ -114,9 +114,8 @@ done shift "$((OPTIND-1))" program=$1 -# ensure that positional argument exists -if [[ -z $program ]]; then - echo "1 positional argument is required." \ +if [[ $# -ne 1 ]]; then + echo "Exactly 1 positional argument is required." \ "For help use -h or --help or see the manpage." | \ tee -a /tmp/tdrop/log exit 1