On 11/13/15 11:13 AM, Griff Miller II wrote:
> 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, so that
> values starting with '-' ca
On Fri, November 13, 2015 12:56 pm, Greg Wooledge wrote:
> 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 nex
On Fri, November 13, 2015 1:02 pm, Dennis Williamson wrote:
> Your opts string needs to begin with a colon to enable silent error
> reporting and you need to handle the colon in your case statement as the
> condition where a required argument is missing.
Hi, Dennis - thanks for replying. I get the
On Fri, Nov 13, 2015 at 10:13 AM, Griff Miller II
wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: cygwin
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='x86_64'
> -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='x86_64-unkno
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 de