June 2006
Intermediate to advanced
64 pages
2h 42m
English
exit
exit [n]Exit a shell script with status n (e.g.,
exit 1). n
can be 0 (success) or nonzero (failure). If n
is not given, the shell's exit status is that of the most recent
command. exit can be issued at
the command line to close a window (log out). Exit statuses can
range in value from 0 to 255.
if [ $# -eq 0 ]
then
echo "Usage: $0 [-c] [-d] file(s)" 1>&2
exit 1 # Error status
fiRead now
Unlock full access