Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!njin!princeton!phoenix!pfalstad From: pfalstad@phoenix.Princeton.EDU (Paul John Falstad) Newsgroups: comp.unix.questions Subject: Re: Eval troubles in sh (1) Message-ID: <2487@idunno.Princeton.EDU> Date: 13 Sep 90 19:27:44 GMT References: <1990Sep13.181238.4388@ecn.purdue.edu> Sender: news@idunno.Princeton.EDU Distribution: usa Organization: Princeton University, Princeton, New Jersey Lines: 17 In article <1990Sep13.181238.4388@ecn.purdue.edu> irick@ecn.purdue.edu (GarBear Irick) writes: >one=YES >VAR=one >eval echo VAR from echo: \$$VAR >tmp1=`eval echo \$$VAR` >eval tmp2=`eval echo \$$VAR` >echo TMP1: $tmp1 >echo TMP2: $tmp2 sh removes backslashes inside backquotes. Try these lines instead: tmp1=`eval echo \\\$\$VAR` eval tmp2=`eval echo \\\$\$VAR` This will produce YES both times. David Hemmings appeared by permission of the National Forestry Commission.