Re: Bash getopts option

2007-03-01 Thread Bob Proulx
Matthew Woehlke wrote: > Shanks wrote: > >The above code does not parse -help option. Any suggestions > > I don't think getopts knows how to parse words as options (and not as > non-GNU-style, certainly). You are probably better off writing your own > parser, something like this: Personally I p

Re: Bash getopts option

2007-02-28 Thread Matthew Woehlke
Shanks wrote: I am trying to parse command line options using getopts. for parsing options that are words , for e.g -help, Bash is not allowing me to do that. while getopts c:d:fh:help options do case $options in help) echo" Help" ;; done The above code does not parse