OPTIND holds invalid vars
マークアップとかダウンとかなんなのよ。訂正再送。 ---src.sh #!/bin/sh set -- -h getopts "h" c echo "$c $OPTIND" --- ~$ dash src.sh #>> h 2 ~$ bash src.sh #>> h 2 ~$ yash src.sh #>> h 1:2 system env: ~$ yash --version #>> 2.48 & 2.51 ~$ uname -r #>> 4.19.0-17-686 (Debian buster)
Why do you think the OPTIND is invalid? Could you describe the issue specifically and state the expected behavior?
Closing as this is not a bug.
---src.sh #!/bin/sh set -- -h getopts "h" c echo "$c $OPTIND" --- ~$ dash src.sh #>> h 2 ~$ bash src.sh #>> h 2 ~$ yash src.sh #>> h 1:2
system env: ~$ yash --version #>> 2.48(apt) & 2.51(source-build) ~$ uname -r #>> 4.19.0-17-686 (Debian buster)