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