Possible Duplicate:
Difference between launching a script with ./script.sh and . ./script.sh
What is difference between running the script as ./script.sh and . ./script.sh
The sourced in (. ./script.sh) script runs in the same shell. Meaning that if it issues exit, your shell exits, if it sets environment variable, your shell is affected, etc. Normally, you want to run scripts in isolated subprocess (./script.sh).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With