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