Bourne Shell Builtins
. (a period)
. filename [arguments] source filename
This will run within the existing shell, ensuring any variables created or modified by the script will be available after the script completes. Running the script just using the filename will execute the script in a separate subshell.
Read and execute commands from the filename argument in the current shell context.
If filename does not contain a slash, the
PATH variable is used to find filename.
When Bash is not in POSIX mode, the current directory is searched if filename is not found in $PATH.
If any arguments are supplied, they become the positional parameters when filename is executed. Otherwise the positional parameters are unchanged.
-T option is enabled,
source inherits any trap on
DEBUG; if it is not, any
DEBUG trap string is saved and restored around the call to
source unsets the
DEBUG trap while it executes.
-T is not set, and the sourced file changes the DEBUG trap, the new value is retained when
The return status is the exit status of the last command executed, or zero if no commands are executed.
filename is not found, or cannot be read, the return status is non-zero. This builtin is equivalent to