Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!mips!sgi!shinobu!odin!thestepchild!rhartman From: rhartman@thestepchild.sgi.com (Robert Hartman) Newsgroups: comp.unix.shell Subject: Re: Shell quoting problem. Passing a "?" parameter. Keywords: sh, quoting Message-ID: <1991May10.220136.5091@odin.corp.sgi.com> Date: 10 May 91 22:01:36 GMT References: <1991May10.062827.19863@lingua.cltr.uq.OZ.AU> <1141@cracklin.oat.bran.gnu.ai.mit.edu> Sender: news@odin.corp.sgi.com (Net News) Distribution: comp Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 31 In article <1141@cracklin.oat.bran.gnu.ai.mit.edu> pfalstad@phoenix.princeton.edu (Paul Falstad) writes: >root@lingua.cltr.uq.OZ.AU (Hulk Hogan) wrote: >>% sh >>$ dm() >>{ >>$* >>} > >dm() >{ >"$@" >} > >>$ ls ? >>1 4 >>$ dm "echo ?" >>1 4 > >$ dm "echo ?" >? >$ ... In sh, if filename expansion fails, the pattern is taken as a literal, so in Paul's example (the second above), there must not have been any 1-character filenames in the working directory. I'm not sure how to turn of globbing (filename expansion) in the Bourne shell, but that's what needs to be done for this to work reliably. Anybody recall how to do that? -r