[torqueusers] still having modules environment / Torque shell
david.backeberg at case.edu
Thu Jun 14 09:26:26 MDT 2007
Correcting my own poorly-worded post...
> If you're asking "how does bash manage exports?" I don't know. I
> assume bash has some kind of global bookkeeping that it reviews when
> spawning a new shell.
I mean that it reviews bookkeeping when processing a command. bash is
a command interpreter shell, and it looks at the values when handling
a command. The word "global" is a misnomer. Setting values via export
only affects the instance of bash where the export was processed.
So until I did the export in /etc/profile.d/modules.sh, the scope of
the modules() command was limited to the modules.sh script. The export
command expanded the scope of the modules() command to the shell that
called /etc/profile.d/modules.sh, which happens to be the instance of
bash run within Torque.
> I simply noticed that the variables that were exported were making it
> into the Torque shell but not the command, so I thought I would try
> exporting the modules() function. When I did this, it solved my
> problem. I admit I had never heard of exporting bash functions before
> I too read the export man page. I tried export with no arguments and
> then the man page said I needed to use -f.
> Hope this helps,
More information about the torqueusers