aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-getopts/getopt_positional.tests
blob: a5404a2a016103ba719cce336b0c34aa874d14e8 (plain)
1
2
3
4
5
6
7
8
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
# unfortunately, "rc:0" is shown since while's overall exitcode is "success"
echo "exited: var:'$var' OPTIND:$OPTIND"