On Fri, Nov 13, 2015 at 10:13:15AM -0600, Griff Miller II wrote:
> % ./myscript -a -b b
> 
> Note that in the last run, getopts does not detect that nothing was passed
> via -a, even though -a requires it. Instead, it thinks the next switch
> (-b) is the value of -a. Perhaps this was a conscious decision,

Yes, it is.

If you want your script to disallow arguments of -a that begin with a
hyphen character, you will have to check for that yourself.

Reply via email to