[Discuss] How to keep '-' in bash args [getopts]

pw p.willis at telus.net
Tue May 1 13:07:09 PDT 2007


Noel,

Do you know if there is a way
to use getopts with option flags that
are strings and not just single characters?

ie:

while getopts ".a:b:c." OPTION
do

will look for flags -a -b and -c.

What if I want to use flags like:

-camels  -dogs -birds

...?

Peter



More information about the Discuss mailing list