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 `=
Package: util-linux
Version: 2.17.2-9.1
Hi!
I've just played a bit with `getopt' and get unexpected output whith
optional arguments:
jbglaw@jblaptop:~$ getopt -o '' -l 'noo,aa,foo' -- --foo ss -- bling
--foo -- 'ss' 'bling'
jbglaw@jblaptop:~$ getopt -o '' -l 'noo,aa,foo:' -- --foo ss -- bling
2 matches
Mail list logo