command substitution

Jonathan I. Kamens jik at athena.mit.edu
Fri Nov 9 09:00:02 AEST 1990


In article <15527 at burdvax.PRC.Unisys.COM>, wrp at PRC.Unisys.COM (William R. Pringle) writes:
|> In article <5697 at alpha.cam.nist.gov> coleman at 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 at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710



More information about the Comp.unix.shell mailing list