Fun with *

Andrew Koenig ark at alice.UUCP
Sun Nov 20 05:34:45 AEST 1988


In article <17247 at agate.BERKELEY.EDU>, weemba at garnet.berkeley.edu (Obnoxious Math Grad Student) writes:
 
> And while you're at it, don't forget the problem of the lexicograph-
> ically first file being named "-f".

If your rm command uses getopt, you can remove a file named "-f" by saying

	rm -- -f

or even

	rm -f -- -f

The `--' is a widget that says `There are no more options after this;
everything else is an argument even if it looks like an option.'
-- 
				--Andrew Koenig
				  ark at europa.att.com



More information about the Comp.unix.wizards mailing list