Csh question
Wayne Mesard
mesard at bbn.com
Thu Jul 21 03:07:01 AEST 1988
>From article <8807191241.AA18881 at decwrl.dec.com>, by ellis at ultra.dec.com (David Ellis):
> Is there any way to get the value of a variable whose name is the value of
> another variable?
>
> e.g. if we've done set x=a and set a=3, is there any simple csh expression
> in terms of x that yields the value of a (3)?
How 'bout:
eval echo \$$x
--
unsigned *Wayne_Mesard(); MESARD at BBN.COM BBN, Cambridge, MA
When Martin Sheen visited me, he was smoking again after his heart
attack, and I asked why. He said, 'It is my friend it is always there
and doesn't pass judgment.' I said, 'Your friend is going to kill you.'"
- Larry King
More information about the Comp.unix.questions
mailing list