Possible Duplicate:
How can I make variables “exported” in a bash script stick around?
I have a problem with executing script from file. When I type in command line
PATH=$PATH:/home/
then PATH
is changed appropriately. But when I execute this file :
#!/bin/sh
#provided by me
PATH=$PATH:/home/
echo "done"
exit 0
done
is printed but PATH
is not changed. Why is this happening ?
/etc/init.d/
and runningupdate-rc.d myScriptName defaults
. Or in other words: is there better way to permanently change$PATH
? – Patryk Feb 21 '12 at 00:19source
and.
but it logs me off from chell. Why is this happening ? – Patryk Feb 21 '12 at 13:09exit 0
from the script. It is telling your shell to exit, which is not what you want. – Kyle Jones Feb 21 '12 at 17:29