Ugly file name

Jonathan I. Kamens jik at athena.mit.edu
Tue May 23 13:45:43 AEST 1989


In article <31925 at sri-unix.SRI.COM> ghe at nucthy.physics.orst.edu
(Guangliang He) writes:
>=	rm -- -badfile
>
>But this trick don't work on the BSD4.3. It has a broken 'getopt' function
>:-) :-)

I'm not sure whether or not the smileys are to indicate that you know
you are incorrect here, so I'll just have to correct you anyway.

rm.c under BSD 4.3 does *not* use getopt at all; if it did, the --
argument would work.  In fact, BSD 4.3's version of rm was written
before getopt even existed, I would bet.

BSD 4.3 Tahoe, on the other hand, uses getopt and therefore gets
things right and -- will work.  - will also work, but will generate a
spurious error message since rm will try to delete the file - and
*then* delete the file after it.

Jonathan Kamens			              USnail:
MIT Project Athena				410 Memorial Drive, No. 223F
jik at Athena.MIT.EDU				Cambridge, MA 02139-4318
Office: 617-253-4261			      Home: 617-225-8218



More information about the Comp.unix.questions mailing list