0
1
I'm using tcsh here, and am trying to get an environment variable that references another one dynamically...
I want to be able to do the following, and I'm sure I've seen it done before elsewhere:
$ setenv A abc
$ setenv B a_is_${A}
$ echo $B
> a_is_abc
$ setenv A def
$ echo $B
> a_is_def
However, when $B is initially set, it evaluates $A at that time, rather than keeping it to be evaluated when actually needed. Meaning that I get the same result for 'echo $B' both times.
Any idea how to do this?
Thanks
Just to let you know - I think I got this one figured out - see my answer to my own question if you're interested... – Hugh – 2010-10-31T16:43:31.687