What does export do in BASH?
- by Chas. Owens
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?