[Next] [Previous] [Up] [Top] [Contents]

5.1 Built-in Commands

5.1.1 Sh

For the Bourne shell some of the more commonly used built-in commands are:

: null command

. source (read and execute) commands from a file

case case conditional loop

cd change the working directory (default is $HOME)

echo write a string to standard output

eval evaluate the given arguments and feed the result back to the shell

exec execute the given command, replacing the current shell

exit exit the current shell

export share the specified environment variable with subsequent shells

for for conditional loop

if if conditional loop

pwd print the current working directory

read read a line of input from stdin

set set variables for the shell

test evaluate an expression as true or false

trap trap for a typed signal and execute commands

umask set a default file permission mask for new files

unset unset shell variables

wait wait for a specified process to terminate

while while conditional loop


Introduction to Unix - 14 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]