Possible Duplicate:
what is the difference between “./somescript.sh” and “. ./somescript.sh”
Please clarify the difference between the shell commands . script.sh vs ./script.sh where script.sh is a shell script.
Thanks
Possible Duplicate:
what is the difference between “./somescript.sh” and “. ./somescript.sh”
Please clarify the difference between the shell commands . script.sh vs ./script.sh where script.sh is a shell script.
Thanks
The difference is simple
. script.sh
executes the shell script using your current shell, so all changes you do in the script (like change directory or variables) will affect your running shell
./script.sh
on the other hand will start a new shell to execute the script. It is usually the better way to launch scripts