Xref: utzoo comp.lang.c:9063 comp.unix.wizards:7659 Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: command line options Message-ID: <864@cresswell.quintus.UUCP> Date: 9 Apr 88 07:11:19 GMT References: <2414@zyx.UUCP> <8039@elsie.UUCP> <7628@brl-smoke.ARPA> <143@gsg.UUCP> <48917@sun.uucp> Organization: Quintus Computer Systems, Mountain View, CA Lines: 18 Summary: remember the -i hack? In article <48917@sun.uucp>, guy@gorodish.Sun.COM (Guy Harris) writes: > > You miss the point; -? already has the desired property; it does not > > have to be explicitly added to every application. > > Relying on the Bourne/Korn shell not expanding some string containing a > pattern-matching metacharacter because you "know" there are no files that match > that string is dangerous (although I do it anyway...). You may someday find > that there *is* such a file. This is more of a UNIX issue than a C issue by now (or do DEC now ship getopts with VMS?). As a UNIX issue, it should be pointed out that as a time-honoured hack for protecting important directories, some people create an empty file called "-i", so that an rm * command will turn into rm -i {everything else} So files matching "-?" are quite likely to exist. Me? Use an appalling hack like that? Only sometimes.