The command:
getopt -o '' -l 'noo,aa,foo::' -- --foo ss -- bling
Gives back:
--foo '' -- 'ss' 'bling'
This is the correct output. As per the manpage:
If the option has an optional argument, it must be written directly
after the long option name, separated by `=', if present
So you would have to use:
getopt -o '' -l 'noo,aa,foo::' -- --foo=ss -- bling
To get:
--foo 'ss' -- 'bling'
Note that this part of the parsing is actually done by getopt(3).
Regards,
Frodo (the author of getopt(3))
--
Frodo Looijaard <[email protected]> (See http://frodo.looijaard.name/)
Defenestration n. (formal or joc.):
The act of removing Windows from your computer in disgust, usually followed
by the installation of Linux or some other Unix-like operating system.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]