Possible Duplicate:
Difference between “a=b” and “export a=b” in bash
It is hard to admit, but I have never really understood what exactly export
does to an environment variable. I know that if I don't export a variable I sometimes can't see it in child processes, but sometimes it seems like I can. What is really going on when I say
export foo=5
and when should I not export a variable?
export
statements to .bashrc/.bash_profile to create persistent global variables similar to$HOME
.