recursive variable substitution in csh
Tom Christiansen
tchrist at convex.COM
Fri Aug 17 04:38:24 AEST 1990
In article <9045 at cg-atla.agfa.com> jmacdon at cg-atla.UUCP (Jeff MacDonald) writes:
>In the C-shell, how does one evaluate a variable which contains the
>name of a variable in order to get the value of the variable
>contained by the variable that one is evaluating?
>
>set x = 'ABC'
>set y = '$x'
>set z = # some function of y such that $z == "ABC"
% eval set z = "$y"
% echo $z
% ABC
--tom
--
Tom Christiansen {uunet,uiucdcs,sun}!convex!tchrist
Convex Computer Corporation tchrist at convex.COM
"UNIX was never designed to keep people from doing stupid things,
because that policy would also keep them from doing clever things." [gwyn]
More information about the Comp.unix.questions
mailing list