1 2set -- -yz -wx 3opt=wrong1 OPTARG=wrong2 4while getopts :x opt; do 5 echo "$opt:${OPTARG-unset}" 6done 7echo "OPTIND=$OPTIND" 8