SYNOPSIS
. file [argument ...]
source file [argument ...]
DESCRIPTION
. (dot) executes a KornShell script in the current environment and then returns. Normally the shell executes a command file in a subshell so that changes to the environment by commands like cd, set, and trap are local to the command file. The . (dot) command circumvents this feature.
If there are slashes in the file name, . (dot) looks for the named file. If there are no slashes, . (dot) uses the search PATH variable to find file. This may surprise some people when they use dot to execute a file under the current directory, but their search rules are not set up to look at the current directory. As a result, the shell doesn't find the file. If you have this problem, you can use
. ./file
This indicates that the shell file you want to run is in the current directory. Also, the file need not be executable, even if it is looked for on the PATH. If you specify more than one argument, . (dot) sets the positional parameters to the argument list before execution.
The source utility is identical to the . (dot) utility.
ENVIRONMENT VARIABLES
DIAGNOSTICS
Possible exit status values are:
Otherwise, the exit status is the exit status of the last command executed from the script.
PORTABILITY
POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems. Windows 2000. Windows XP. Windows Server 2003. Windows Vista.
On Windows systems, . (dot) adds .ksh as a suffix to file if there is no . in the file.
The ability to handle arguments is an extension to the POSIX.2 and XPG standards.
NOTE
This is a special built-in command of the MKS KornShell.
AVAILABILITY
MKS Toolkit for Power Users
MKS Toolkit for System Administrators
MKS Toolkit for Developers
MKS Toolkit for Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
MKS Toolkit 9.2 Documentation Build 16.