Source or DOT operator

. (source or dot operator)

      . 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

Executing a script

[raja@AGRAJA~]$ source script_name
[raja@AGRAJA~]$ sh script_name
[raja@AGRAJA~]$ csh script_name
[raja@AGRAJA~]$ ./script_name
[raja@AGRAJA~]$ bash script_name

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s