I'm having trouble using any predefined environmental variable in my module files. For example a line like this setenv TEST ${HOSTNAME}
throws an error, where ${HOSTNAME}
is defined by the system as a global environmental variable. The error looks like: ERROR:102: Tcl command execution failed: set TEST ${HOSTNAME}
. I have set environmental variables in the module file itself and tried using those and get the same kind of error. For example,
This does not work:
setenv DUMMY /location/to/some/file
setenv TEST ${DUMMY}
I get a similar error as above: ERROR:102: Tcl command execution failed: set TEST ${DUMMY}
. However,
This works:
set DUMMY /location/to/some/file
setenv TEST ${DUMMY}
There are certain lines that I needed to use predefined global environmental variables, so the above command cannot be used.
How can one use a predefined environmental variable in module files?