Bourne Shell
Bourne Shell


The Bourne shell is the original Unix shell. It is the only shell that you can be sure will be on any Unix system. It is the shell of choice for writing shell programs but it is not a very good choice for interactive use. See Summary of Shell Facilities.

Bourne Shell Files
First the system profile and then the user's .profile are executed automatically at login. Below is a short example of a user's .profile that could be used if the Bourne shell is the default shell.

set -a			# export all variables defined
			#  from this point
PATH=/usr/bin:/bin:/usr/local/bin:.
MANPATH=/usr/man:/usr/local/man

MACHINE='uname -n'
PS1="$LOGNAME $MACHINE\ >"
HISTSIZE=100
ulimit -x 0	# core files are not created

# Uncomment the following lines and replace XXX 
# with your favorite printer
# LPDEST=XXX
# PRINTER=XXX

If a line has a "#" in it, all of the rest of the line is treated as a comment. Note that in PATH commends directories are seperated by a ":". Also note that the current path is indicated by a ".". For more information on the Bourne shell try man sh.

Bourne Shell Commands
Shell Command Action
echo string Write string to standard output
exec command Execute command to standard output
exit n Exit the shell with exit status n
export variableExport variable to standard output
set options Print the value of all variables known to the current shell
filename Read and execute commands from executable file filename