prompt when invalid command line option is given.

This commit is contained in:
Isaac Connor 2017-05-09 16:57:02 -04:00
parent fc52766606
commit e3a05d7cfc
1 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,9 @@ case $i in
shift # past argument with no value
;;
*)
# unknown option
# unknown option
read -p "Unknown option $i, continue? (Y|n)"
[[ $REPLY == [yY] ]] && { echo "continuing..."; } || exit 1;
;;
esac
done