blob: a5404a2a016103ba719cce336b0c34aa874d14e8 [file] [log] [blame]
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"