system@asuvax.asu.edu (Marc Lesure) (10/14/89)
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. ----------------------------------------------------------------------- Marc "Lost in Limbo" Lesure "Between the world of men and make-believe, I can be found..." "False faces and meaningless chases, I travel alone..." "And where do you go when you come to the end of your dream?" UUCP: ...!ncar!noao!asuvax!lesure Internet: lesure@asuvax.eas.asu.edu
gwyn@smoke.BRL.MIL (Doug Gwyn) (10/14/89)
In article <948@asuvax.asu.edu> system@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.