-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to [EMAIL PROTECTED] on 2/12/2008 4:34 PM: | $ cut -s' ' | cut: invalid option -- | Try `cut --help' for more information. | | What do you mean, " "? | I typed an -s. Give a proper error message.
Your problem is that -s does not take an argument. So according to getopt rules, you did the equivalent of "cut -s '- '". But since there is no such option as '- ', you get the default getopt warning message that space is not a recognized short option (and cut recognized your -s just fine). You would get that message from any application that uses getopt when you hand it an invalid short option, whether or not the invalid option was bundled behind other short options that don't take arguments. I will admit, however, that the error message: "cut: invalid option -- " could be better rendered as "cut: invalid option -- ' '" but that would make the gnulib getopt implementation drift from glibc. Maybe you're better off reporting this to glibc. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHsvSg84KuGfSFAYARAq9WAJ9Yr1TNcGi2rPFBUZof5x/WAWSOLQCffCh2 KjlBIPt6KDrawdAuiA3kjnM= =o10G -----END PGP SIGNATURE-----
