Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!sol.ctr.columbia.edu!emory!gatech!wrdis01!mips!atha!aupair.cs.athabascau.ca!rwa From: rwa@cs.athabascau.ca (Ross Alexander) Newsgroups: comp.os.misc Subject: Re: shell architecture (to glob or not to glob) Message-ID: <711@aupaircs.athabascau.ca> Date: 5 Mar 91 19:35:27 GMT References: <378@bria> <5615@awdprime.UUCP> <1991Mar3.020451.5596@metapro.DIALix.oz.au> <19503@cbmvax.commodore.com> Organization: Athabasca University Lines: 24 jesup@cbmvax.commodore.com (Randell Jesup) writes: [....] > Unfortunately, the user must know in advance if a glob will result in >-xxx filenames BEFORE invoking the command, or must always use -- on all >command lines. What would happen someone created a file named -r in a >directory where you often delete some files with *, or *.c, or whatever? >Or -rf? There are all sorts of other nasty possibilities that you can't know >about unless you do the globbing once to see which files it matches. Since you use the words `must', `can''t', and `always', I am forced to disagree. Use of the `./*' form of the filename glob eliminates this little trojan. It's always available (unlike `--') unless, of course, you're in the truly pathological case of a . directory without read perms, it's simple, it's been around since donkey's years. I only wish there was really as much concern for pathological conditions as you posit. BTW, isn't this whole thing in the FAQ? More ignorance of globbing/quoting has been spewed around via this thread than I've seen in a long time. -- -- Ross Alexander rwa@cs.athabascau.ca (403) 675 6311 ve6pdq "Oh, I know it's a penny here and a penny there, but look at me. I worked myself up from nothing to a state of extreme poverty." --Groucho Marx