Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.sys.hp Subject: Re: Trying to remove a file called "-ls" Message-ID: <1434@auspex.auspex.com> Date: 14 Apr 89 18:33:41 GMT References: <570@sdrc.UUCP> <5950015@hpccc.HP.COM> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 34 >I was just wondering.... > >would the command > > rm "-ls" > >work? "rm" is incapable of distinguishing rm -ls from rm "-ls" All the quotes do is affect the way the shell parses the argument; the argument is passed to the command in the same fashion. >I used that form to get rid of a file that had a trailing blank space >at the end of the name (couldn't figure out why it kept showing up in the list >but "rm" could never find it!)..... That's because it wasn't "rm" that had the problem with the trailing blank space, it was the shell. rm "foobar " causes the shell to pass the string "foobar " to "rm". rm foobar causes the shell to pass the string "foobar" (no trailing space) to "rm".