1 2 3 4 5 6
# $FreeBSD: releng/12.0/bin/sh/tests/builtins/getopts7.0 265844 2014-05-10 17:42:21Z jilles $ set -- -x getopts :x: var r=$? [ r != 0 ] && [ "$OPTIND" = 2 ]