command line options

Richard A. O'Keefe ok at quintus.UUCP
Sat Apr 9 17:11:19 AEST 1988


In article <48917 at sun.uucp>, guy at 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.



More information about the Comp.unix.wizards mailing list