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
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
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-unknown-cygwin'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale'
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'
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
Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.4
Compiler: cc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc'
-DCONF_OSTYPE='solaris2.4' -DCONF_MACHTYPE='sparc-sun-solaris2.4'
-DCONF_VENDOR='sun' -DLOCALEDIR='/usr/share/locale'
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 '-'
On Thu, Nov 12, 2015 at 04:45:49PM -0800, Linda Walsh wrote:
> I'm coming up with a null-record in my brain when I think
> about this: I'd like to be able to record stdout and stderr
> without using any temp files into bash array files, AND
> record the status of the command executed.
There is