Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!orion.cf.uci.edu!uci-ics!venera.isi.edu!raveling From: raveling@vaxb.isi.edu (Paul Raveling) Newsgroups: comp.sys.hp Subject: Re: Trying to remove a file called "-ls" Keywords: HP bug Message-ID: <7770@venera.isi.edu> Date: 13 Mar 89 18:59:40 GMT References: <570@sdrc.UUCP> <2087@helios.ee.lbl.gov> Sender: news@venera.isi.edu Reply-To: raveling@isi.edu (Paul Raveling) Organization: USC-Information Sciences Institute Lines: 32 In article <2087@helios.ee.lbl.gov> JEMilburn@lbl.gov writes: >In article <570@sdrc.UUCP> diblanch@sdrc.UUCP (Jeff Blanchet) writes: >>I seem to have stumbled across a bug that occurs on the HP. I created a file >>called "-ls". Now on any other UNIX system all I have to do is issue the > >Try rm "-ls". That produces: rm: illegal option -- l rm: illegal option -- s usage: rm [-fir] file ... However, it DOES work to say "rm ./-ls". In this case you can fool ls by sticking in an otherwise superflous path. Now suppose you want to search for "-ls" in a bunch of files... Try a "grep -ls *" -- it hangs up waiting for you to type something. Maybe "grep \-ls *"? Same result -- the shell eats the '\'. But it DOES work to say "grep \\-ls *". But it does NOT work to say "rm \\-ls". Just a modest dose of the countless reasons why my xload window's slogan says "Give Me Liberty or Give Me Unix!". ---------------- Paul Raveling Raveling@isi.edu