nested loops

Donald Lashomb donlash at uncle.uucp
Sun Aug 12 13:01:37 AEST 1990


In article <4103 at herbie.misemi> adley at herbie.misemi ( iccad) writes:
=[...]
=The problem lies in the  $`echo $i` statment
=the `echo $i` preforms as expected and the result is one of this,
=that, or them
=the $ infront of this statment however is taken as a literal $
=and does not return the value of the variable this or that or them
=instead it returns $this or $that or $them.
=[...]

Try using an eval like this:  eval $`echo $i`
eval causes the shell to "double-scan" the line,
thereby picking up and evaluating the ${this/that/whatever}
as a variable.

-Don



More information about the Comp.unix.wizards mailing list