Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

User Commands (d - f) exit(1)
NAME
exit - Causes the shell to exit
SYNOPSIS
exit [n]
DESCRIPTION
The exit command causes the shell to exit with the exit status specied by n.Ifn is omitted, the
exit status is that of the last command executed. An End-of-File also causes the shell to exit,
unless the shell has the ignoreeof option (see set) turned on.
EXAMPLES
1. The following command exits the OSS shell with a value of true.
exit 0
EXIT VALUES
If n is not specied, the exit status will be the exit value of the last command executed, or 0 (zero)
if no command was executed.
NOTES
Parameter assignment lists that precede the command remain in effect when the command
completes.
I/O redirections are processed after parameter assignments.
Errors cause a script that contains the commands so marked to abort.
The exit command is a shell built-in command. It differs from the regular commands in that it does
not open a new shell process when it executes.
A general discussion of shell built-in commands and a list of the OSS shell built-in commands are
in the reference page for sh(1).
RELATED INFORMATION
Commands: set(1), sh(1).
527188-004 Hewlett-Packard Company 3119