xref: /freebsd/bin/sh/tests/builtins/getopts6.0 (revision f0865ec9906d5a18fa2a3b61381f22ce16e606ad)
1
2set -- -x -y
3getopts :x var || echo "First getopts bad: $?"
4getopts :x var
5r=$?
6[ r != 0 ] && [ "$OPTIND" = 3 ]
7