xref: /freebsd/bin/sh/tests/builtins/getopts8.0 (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1
2set -- -yz -wx
3opt=wrong1 OPTARG=wrong2
4while getopts :x opt; do
5	echo "$opt:${OPTARG-unset}"
6done
7echo "OPTIND=$OPTIND"
8