In a script I wish to specify two environment variables like this;
setenv FOO bee
setenv ${FOO}_ROOT /home/bee
This is ok and will set "FOO=bee" and "bee_ROOT=/home/bee".
Now I wan't to build the "bee_ROOT" variable using "FOO" and use the
value in a expression, i.e. something like this;
source ${${FOO}_ROOT}/.cshrc
This will not execute. The error is "Variable syntax". It seems that
the shell cannot figure to evaluate the inner ecpression first and
then the outer. I have tried different combination of forcing
evaluation with '' and assigning to variable first etc, but with
little luck.
Any idea/explanation why this is not possible/what I can do instead?
Cheers,
Gert.