What is export for?
export
What is the difference between:
export name=value
and
name=value
To illustrate what the other answers are saying:
$ foo="Hello, World" $ echo $foo Hello, World $ bar="Goodbye" $ export foo $ bash bash-3.2$ echo $foo Hello, World bash-3.2$ echo $bar bash-3.2$
export will make the variable available to all shells forked from the current shell.