Name

source - Read shell commands from a file

Syntax

source file

Description

Source causes the shell to read lines from a file and execute them one at a time as a batch operation. Processing terminates when the end of the file is reached, or when appropriate commands instruct the shell to stop.

Source reads commands from any type of file; therefore, there is no need to change the file’s type.

To invoke a shell script without having to use the source command, change the file’s type to “CMD” with setfile.

See Also

csh(C), scripts(M), setfile(C)