how do you set an env variable from within a csh script?
I'm creating a job system that will allow users to create a new "job". It essentially makes a whole bunch of directories and creates/modifies a whole bunch of environment variables. The environment variables are determined by user input when they run the script (one of the command line arguments).
If I simply use "setenv FOO BAR", the variable FOO is only set for the duration of the script. How do I make it persist? I've read that I could use the '.' command to launch another file from within my script, but then how would I get the user input to that file? I'm making a csh script just because I'm more familiar with csh. I suppose I could use bash if this becomes easier in bash. |
It doesn't, though.
Basically shell variables aren't persistent. If you need that feat. you may have to look into a bit more of coding and read/write the required values from/to files, I guess. Cheers, Tink |
Quote:
|
man bash
/COMMAND EXECUTION Cheers, Tink |
All times are GMT -5. The time now is 07:05 AM. |