In bash: I input the command:
getopt -l name,data -- --namd
and the output is
-- name,pp -- --namd
input :
getopt -l name,data -- --name
the output alse
-- name,pp -- --name
why it dosen’t tell me the err when i input getopt -l name,data -- --namd?
The problem is that on the mac, getopt is the BSD based getopt, rather than the gnu-based getopt.
It doesn’t understand long options. It’s not that it ‘doesn’t work well’, it’s that it’s not designed to do what you asked.