Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14250 > unrolled thread
| Started by | Hyunho Cho<mug896@naver.com> |
|---|---|
| First post | 2018-06-20 17:16 +0900 |
| Last post | 2018-06-20 17:16 +0900 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
$OPTIND varibale value is different from sh Hyunho Cho<mug896@naver.com> - 2018-06-20 17:16 +0900
| From | Hyunho Cho<mug896@naver.com> |
|---|---|
| Date | 2018-06-20 17:16 +0900 |
| Subject | $OPTIND varibale value is different from sh |
| Message-ID | <mailman.2279.1529482623.1292.bug-bash@gnu.org> |
if $OPTIND value start from 1 then i think "-b" $OPTIND should be "3" like sh but bash print "2" set -- -a -bc hello world echo $OPTIND # sh, bash = 1 getopts abc opt "$@" echo $opt, $OPTIND # sh, bash = a, 2 getopts abc opt "$@" # bash = b, 2 <------ different from "sh" echo $opt, $OPTIND # sh = b, 3 getopts abc opt "$@" # sh, bash = c, 3 echo $opt, $OPTIND
Back to top | Article view | gnu.bash.bug
csiph-web