Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!ginosko!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: getopt question Keywords: getopt Message-ID: <11289@smoke.BRL.MIL> Date: 14 Oct 89 05:44:52 GMT References: <948@asuvax.asu.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 9 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.