Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15367

Wrong explanation of getopts

From Roland Illig <roland.illig@gmx.de>
Newsgroups gnu.bash.bug
Subject Wrong explanation of getopts
Date 2019-09-15 21:57 +0200
Message-ID <mailman.301.1568577474.2190.bug-bash@gnu.org> (permalink)
References <0bc4f0f2-863d-5c42-76d8-857f74a1d8fa@gmx.de>

Show all headers | View raw


The help text of getopts says:

>   Getopts normally parses the positional parameters ($0 - $9), but if
>   more arguments are given, they are parsed instead.

The positional parameter $0 (is it even called that way) is not parsed
by getopts. Its only use might be in error messages, but I'm not sure
about it.

The "instead" in "they are parsed instead" is totally wrong. $1 to $9
are always parsed, no matter if there are more than 10 positional
parameters or not.

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Wrong explanation of getopts Roland Illig <roland.illig@gmx.de> - 2019-09-15 21:57 +0200

csiph-web