recursive variable substitution in csh

Jeff MacDonald jmacdon at cg-atla.agfa.com
Thu Aug 16 07:49:37 AEST 1990


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?

To wit:

set x = 'ABC'
set y = '$x'
set z =      # some function of y such that $z == "ABC"


Don't ask how I got into this predicament, it's not funny!
-- 
Jeff MacDonald   ([decvax|samsung|ima|ulowell]!cg-atla!jmacdon)
Agfa/Compugraphic Division  200-2-9F (jmacdon at cg-atla.agfa.com)
200 Ballardvale, Wilmington MA 01887
(508) 658-0200,  extension 5406                        Hi, Mom!



More information about the Comp.unix.questions mailing list