Results 1 to 3 of 3
Hi, I need to have an environment variable global for all the shells. So I am doing this-
$ MY_VAR='some value'
$ export MY_VAR
now if i close the current ...
- 10-06-2007 #1
'export' does not work in FC7?
Hi, I need to have an environment variable global for all the shells. So I am doing this-
$ MY_VAR='some value'
$ export MY_VAR
now if i close the current terminal and open up another and type-
$ echo $MY_VAR
just a blank line prints. So, export doesn't work? I am using FC7. Is it a bug then?
What to do..?
- 10-06-2007 #2
export is working as it should. If you want the variable to be permanent, then put your export statement it in /etc/profile, ~/.profile or ~/.bash_profile.
- 10-07-2007 #3Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
export tells the shell that the variable is to be inherited by all subprocesses. The exported variable disappears when the shell it's set in is terminated.


Reply With Quote