apache Asked: 2010-04-24 23:04:38 +0800 CST2010-04-24 23:04:38 +0800 CST 2010-04-24 23:04:38 +0800 CST Is export in bash alias of eval function which many other scripts have? 772 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? bash export 1 Answers Voted Ignacio Vazquez-Abrams 2010-04-24T23:19:54+08:002010-04-24T23:19:54+08:00 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"'
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.