Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.shell Subject: Re: command substitution Message-ID: <1990Nov8.220002.7489@athena.mit.edu> Date: 8 Nov 90 22:00:02 GMT References: <5697@alpha.cam.nist.gov> <15527@burdvax.PRC.Unisys.COM> Sender: daemon@athena.mit.edu (Mr Background) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Organization: Massachusetts Institute of Technology Lines: 24 In article <15527@burdvax.PRC.Unisys.COM>, wrp@PRC.Unisys.COM (William R. Pringle) writes: |> In article <5697@alpha.cam.nist.gov> coleman@cam.nist.gov (Sean Sheridan Coleman X5672) writes: |> >set date = `basename `awk '{print $7}' /tmp/process.$$`` |> |> You can use a backslash to quote backward quotes: |> |> `basename \`awk '{print $7}' /tmp/process.$$\`` |> Backslashing backquotes to nest command evaluation substitution doesn't work in the C-shell, and the syntax of shell code in the original poster's message implies that that's what he's using. (As an aside, it would help if people would say in their messages what shell they are using, and not leave us to guess based on their questions. Sometimes it's possible to guess, sometimes it isn't. People who already make sure to do this can just ignore the last two sentences. :-) -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710