Path: utzoo!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!lobster!nuchat!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.os.misc Subject: Re: Globbing Message-ID: Date: 11 Mar 91 17:26:55 GMT References: <17097@lanl.gov> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Distribution: na Organization: Xenix Support, FICC Lines: 38 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. > It is no trick to come up with numerous examples of globbing that fit > each of these three categories - or more than one at a time! Yes, but only category one is a case where you want globbing in the local namespace under more than one context. If you're using a different language you have to deal with possible conflict with filenames, standard command syntax, etc... Let's deal with an imaginary machine where the command syntax is a set of keywords and file names separated by spaces or slashes, with keywords preceded by slashes, and you want to search for "accounts receivable" on a remote system where filenames include slashes and spaces: search /pat=accounts receivable/opt/inp=xenix::/usr/accounting/*.*. oops: search /pat="accounts receivable"/opt/inp="xenix::/usr/accounting/*.*". You have to have quoting rules for all this anyway. In practice, you have to assume that non-file-name arguments and foreign file name arguments need to be quoted. So why get all bent out of shape over another reason to do what you need to be doing anyway? -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"