Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!bacchus!mwm From: mwm@pa.dec.com (Mike (My Watch Has Windows) Meyer) Newsgroups: comp.os.misc Subject: Re: Globbing Message-ID: Date: 12 Mar 91 19:09:52 GMT References: <17097@lanl.gov> Sender: news@pa.dec.com (News) Distribution: na Organization: Missionaria Phonibalonica Lines: 32 In-Reply-To: peter@ficc.ferranti.com's message of Mon, 11 Mar 91 17:26:55 GM In article peter@ficc.ferranti.com (Peter da Silva) writes: In article <17097@lanl.gov> jlg@lanl.gov (Jim Giles) writes: > 2) You want an argument globbed, but _not_ in the context of the > local filespace. > 3) You want the argument globbed, but _not_ in the context of a > filespace at all. No problem. *just quote the pattern that you're passing to the program*. Since the quoting and shell globbing are uniform and consistent, the result is clean and consistent. Because the globbing isn't in the local file space, the program can't glob them using the "standard globbing function" anyway, so it's going to have to be treated specially anyway. Actually, if your "standard globbing function" is designed correctly, you _can_ use it in the latter two cases. Whether you call this use "globbing" or not is immaterial. The advantage of providing a single (preferably shared) library to deal with regular expressions/globbing is that all tools that use the library wind up handling the same regular expressions. If you insist on having a shell that globs on a system that provides a standard mechanism for globbing, it's still a win for the shell to use that mechanism - that means the expressions expanded by the shell will match the ones used by your other tools.