Sourcing files on Unix and Mac OS X

To source a file means to execute commands contained in a text file in the current instance of the shell. This is accomplished using a command built into the shell.

Under Bourne shell and its derivatives, the name of this command is . (a single period). For example, if SQL Anywhere is installed in /opt/sqlanywhere12, the following statement sources sa_config.sh:

.  /opt/sqlanywhere12/bin32/sa_config.sh

For example, on a Mac, run the following statement to source sa_config.sh:

. Applications/SQLAnywhere12/System/bin32/sa_config.sh

Under C-shell and its derivatives, the command is source. For example, if SQL Anywhere is installed in /opt/sqlanywhere12, the following statement sources sa_config.csh:

source  /opt/sqlanywhere12/bin32/sa_config.csh
 Configuring the samples