Basic question about exporting shell variables
Hello,
I did the following:
1. I set a shell variable as follows un shell one:
"MYVAR=foo"
2. I printed the value of MYVAR in the same shell (shell one) as follows:
"echo $MYVAR"
3. I exported the variable so that it be available in other shells (from shell one):
"export MYVAR"
4. I then tried to display the value of MYVAR in an another shell (shell two) as follows:
"echo $MYVAR" and I get a blank line...
Can anyone help me? I thought that by exporting the variable it became a global variable instead of remaining a local variable...
Any help welcome,
Julien.
|