getopt question

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Oct 14 15:44:52 AEST 1989


In article <948 at asuvax.asu.edu> system at asuvax.asu.edu (Marc Lesure) writes:
>The man page of 'getopt' shows that a ':' is used to indicate that the
>option has an argument following it.  My question is, does a version
>of 'getopt' exist that allows an option to have an optional argument that
>may or may not follow it.

Since getopt() (and the shell built-in "getopts") is supposed to implement
the UNIX Command Syntax Standard, of which the behavior you describe is a
clear violation, one hopes not.



More information about the Comp.unix.questions mailing list