Xref: utzoo comp.lang.c:9078 comp.unix.wizards:7666 Path: utzoo!mnetor!uunet!husc6!mailrus!ames!oliveb!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: command line options Message-ID: <48963@sun.uucp> Date: 9 Apr 88 21:18:17 GMT References: <2414@zyx.UUCP> <8039@elsie.UUCP> <7628@brl-smoke.ARPA> <10219@ulysses.homer.nj.att.com> Sender: news@sun.uucp Lines: 13 Follwup-To: comp.unix.wizards > >The first time around I get the right result--a usage message. The second > >time, though, the contents of "-x" is dumped in wide format. > > That's because the shell is expanding -? to "-w -x". If there is no > match, the shell leaves the -? alone. I think he already knew that - that was his whole point! He gave a real, not a hypothetical, case where the shell *will* expand "-?" to something, rather than leaving it alone, and therefore where "-?" won't do what it has, on occasion, been claimed to do. "-?" is *NOT* guaranteed to give you a usage message, with *ANY* shell, unless you put it in quotes.