As an example, if variables are defined in the script, after running with ./script.sh they won't be available in the current shell; they will if running with . ./script.sh
–
Michael ZilbermannMar 18 '11 at 17:47

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).

./script.sh runs the script. A new sub-shell is spawned and the script runs in it. Any changes to the environment made by the script will be local to the sub-shell. Once the subshell exits you won't see the changes made by it in the parent shell.

. ./script.sh sources the script that is it is run in the current shell so any environment changes made by the script will remain after the script exits.

As you can see adding a "." makes the script run in the context of the current shell instead of as a separate process, and affects the environment of the current process, and everything else that comes with the current process.