If a variable is not marked for export, any new shells that it starts will
not have that variable set. However, you can mark a variable for export by
passing it to the export built-in:
$ FOO=foo
$ BAR=bar
$ export BAR
$ echo $FOO $BAR
foo bar
$ bash
$ echo $FOO $BAR
bar
In this example, the variables FOO and BAR were
both set, but only BAR was marked for export. When a new bash was
started, it had lost the value for FOO. If you exit this new bash,
you can see that the original one still has values for both FOO
and BAR:
$ exit
$ echo $FOO $BAR
foo bar