February 2001
Beginner to intermediate
448 pages
9h 2m
English
Official Description
Causes the shell to exit with the exit status specified by n.
Syntax
exit [n]
Options
None
Oddities
If n is omitted, the exit status is that of the last command executed.
The $? variable is changed after each command, including null commands (carriage returns).
Example
$ print $$ # Current pid 3972 $ $ ksh # Make child process $ $ print $$ # Child pid 4128 $ $ exit 5 # Exit from child with failing status $ print $? 5 # Display status $
Read now
Unlock full access