I don't have much experience with export
but it gives me the impression that it's quite similar with eval
.
Am I wrong or not?
Normally variables assigned to are only available to the current shell process. export
makes sure that child processes have the environment variable set as well.
foo=123
echo "$foo"
bash -c 'echo "$foo"'
export foo=123
echo "$foo"
bash -c 'echo "$foo"'