From 0d6e3e73cc2cd5ef4c462b9d3758b7f29d946810 Mon Sep 17 00:00:00 2001 From: nicholas Date: Tue, 4 Sep 2018 14:49:00 -0400 Subject: [PATCH] Exit cleanly after finding an error in the args. --- passphrase | 3 +++ 1 file changed, 3 insertions(+) diff --git a/passphrase b/passphrase index 6fedf3b..e461580 100755 --- a/passphrase +++ b/passphrase @@ -9,6 +9,8 @@ SPACE=0 # default to no spaces between words COUNT=1 # default to one group of passphrases WORDS=3 # default to three-word phrases +DICT='/usr/share/dict/words' # standard location of the words file + echo "" while [[ $# > 0 ]]; do # iterate through arguments, one or two steps at a time @@ -48,6 +50,7 @@ done if [ "$COUNT" -lt 1 ] || [ "$WORDS" -lt 1 ]; then echo -e "Don't be cheeky.\n" + exit 1 fi