export builtin

The builtin that marks a shell variable so child processes receive a copy of it in their environment.

In more detail

After export city, every program the shell starts can read city, but a child that changes it only changes its own copy. VAR=value command sets a variable in the environment of that one command only.

Examples

export city=London
bash show.sh

Related terms

Taught in

References