Solved [Solved] variables don't keep in memory

Hi,
I have a problem executing a script. I would inizialize some variables with the command export and when I source this script with source ./vars the result is:
Code:
export: Command not found.
and the variables are not declared.
after that I tried /bin/sh ./vars
and there aren't error, but when I tried to see the variables it let me "Undefined variable".
The file is like this:
Code:
export EASY_RSA="/scratch"
echo "here"
echo $EASY_RSA
and the output of /bin/sh ./vars is:
Code:
here
/scratch
after that echo $EASY_RSA
and the output is:
Code:
EASY_RSA: Undefined variable.

I'm logged in with root and the permess of file vars is "7777".
What can I do to execute the script?
 
Re: variables don't keep in memory

If your using the default shell (csh), you set variables with setenv. setenv EASY_RSA "/scratch" Add them to ~/.cshrc if you want them to be set automatically every time you login in.
 
Re: variables don't keep in memory

Toast said:
If your using the default shell (csh), you set variables with setenv. setenv EASY_RSA "/scratch" Add them to ~/.cshrc if you want them to be set automatically every time you login in.
Thank you!
It work!
 
Back
Top