-
Notifications
You must be signed in to change notification settings - Fork 416
Source
Deekshith SN edited this page Jan 29, 2021
·
1 revision
- The source command can be used to load any functions file into the current shell script or a command prompt.
- It read and execute commands from given FILENAME and return.
- The pathnames in $PATH are used to find the directory containing FILENAME. If any ARGUMENTS are supplied, they become the positional parameters when FILENAME is executed.
In other words The source command is a handy utility that can be used to refresh environment variables.
Syntax
source filename [arguments]
source functions.sh
source /path/to/functions.sh arg1 arg2
source functions.sh WWWROOT=/apache.jail PHPROOT=/fastcgi.php_jail
NOTE: While the options provided here work on most UNIX systems, some UNIX flavors may have changed their meanings or uses. If you experience an incompatibility with these options, please consult the manual page (see man command) on your system for a list of compatible options.
UNIX