don't understand a command "."

Hi all,

I have a script with those two lines :

test -f $PWD/mysetup.txt
. $PWD/mysetup.txt

I understand the first one, but could anyone explain me the role of the second one? All the thing I find is the usage :

Thx in advance

IT sources a file - meaning it runs the shell script IN THE CURRENT process - this is the way you can run a script to set/change environment variables.

Ordinary runs of a script are in a child process. No changes to environment variables are passed from the child back up to the parent.

It is called sourcing. It will kind of include or import the things that are in that text-file. If it was a definition of variables or some commands executing, these would be sourced into the calling script too.

Here is a thread about it

Ok, tanks for your answers both of you!