busybox/shell/hush_test/hush-getopts/getopt_positional.tests
Denys Vlasenko 81f962f3df hush: teach getopts to set/unset OPTARG
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-11 02:05:21 +02:00

8 lines
187 B
Plaintext
Executable File

set -- -q -w -e r -t -y
echo "*** no OPTIND, optstring:'we' args:$*"
var=QWERTY
while getopts "we" var; do
echo "var:'$var' OPTIND:$OPTIND"
done
echo "exited: var:'$var' OPTIND:$OPTIND"