bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wrong explanation of getopts


From: Roland Illig
Subject: Wrong explanation of getopts
Date: Sun, 15 Sep 2019 21:57:44 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]