fixed printf sending errors to stdout
This commit is contained in:
parent
60eba51303
commit
9728ed68f3
6
tomcat
6
tomcat
@ -20,10 +20,10 @@ if test -n "$(printf "%s\n" "$argv1" | sed -n '/.*\..*/p')"; then
|
||||
# cut out everything before the first period for KEY
|
||||
KEY=$(printf "%s\n" "$argv1" | sed -n 's/^[^.]*\.//p')
|
||||
! test -n "$KEY" &&\
|
||||
printf "%s: No key specified\n" "$argv0" &&\
|
||||
printf "%s: No key specified\n" "$argv0" 1>&2 &&\
|
||||
exit 65 # sysexits(3) EX_DATAERR
|
||||
else
|
||||
printf "%s: No key specified\n" "$argv0"
|
||||
printf "%s: No key specified\n" "$argv0" 1>&2
|
||||
exit 65 # sysexits(3) EX_DATAERR
|
||||
fi
|
||||
|
||||
@ -64,7 +64,7 @@ if test -n "$ARR"; then
|
||||
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"
|
||||
printf "%s: %s: No such key or table\n" "$argv0" "$argv1" 1>&2
|
||||
exit 65 # sysexits(3) EX_DATAERR
|
||||
else
|
||||
printf "%s\n" "$VAL"
|
||||
|
Loading…
Reference in New Issue
Block a user