. (source or dot operator)

SYNTAX
      . filename [arguments]

      source filename [arguments]

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

The return status is the exit status of the last command executed, or zero if no commands are executed. If filename is not found, or cannot be read, the return status is non-zero.

A period `.' is a synonym for `source'

source is a bourne shell builtin and a POSIX `special' builtin

Related commands:

command - Run a command - ignoring shell functions
builtin - Run a shell builtin
crontab - Schedule a command to run at a later time
chroot - Run a command with a different root directory
exec - Execute a command
if - Conditionally perform a command
nohup - Run a command immune to hangups
su - Run a command with substitute user and group id
type - Describe a command
watch - Execute/display a program periodically

Equivalent Windows NT commands:

Batch files must have a filename that ends with .CMD or .BAT
CMD - Start a new CMD shell



Back to the Top

Simon Sheppard
SS64.com