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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The built-in command
.causes the script to be run in the current process rather than in a subprocess. Using.allows your script to alter the environment of the current process. For example:Notice how in the second case, the environment variable FOO was created in the current process.
Here’s a link to the bash man page section dealing with the
.command:http://www.gnu.org/software/bash/manual/bashref.html#index-g_t_002e-108