diff --git a/tomcat b/tomcat index 7d65ff5..9453ce0 100755 --- a/tomcat +++ b/tomcat @@ -2,6 +2,7 @@ set -e +argv0="$0" argv1="$1" argv2="$2" @@ -59,6 +60,9 @@ if test -n "$ARR"; then # change the line delineator to newlines for parsing and output the result printf "%s\n" "$VAL" | sed 's/ /\n/g' | head -n "$ARR" |\ tail -n 1 +elif ! test -n "$VAL"; then + printf "%s: %s: no such key or table\n" "$argv0" "$argv1" + exit 65 # sysexits(3) EX_DATAERR else printf "%s\n" "$VAL" fi