I\'ve seen shell scripts that include a line such as:
source someOtherFile
I know that causes the content of someOtherFile
to
source
is a Unix command that evaluates the file following the command, as a list of commands, executed in the current context. You can also use .
for sourcing the file.
source my-script.sh;
. my-script.sh;
Both commands will have the same effect.
In contrast, passing the script filename to the desired shell will run the script in a subshell, not the current context.