[Ilugc] EXPORT command in shell script not working
- From: praveen@xxxxxxxxxxx (Praveen)
- Date: Fri Aug 6 11:19:13 2004
Harris Rahman wrote:
[root@localhost /] ./shell_script
Is this a bug with the EXPORT command or am i not understanding the
function of this command . I request you all to please help me solve this.
If you run a shell script as ./shell_script, this is executed with a new
shell. So, what ever you export is for the child shell and it is not
visible in your parent shell (when child terminates it is gone).
To make this to influence your parent shell, you have to do either
'source shell_script' or '. shell_script'
Other related posts: