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

return(1) OSS Shell and Utilities Reference Manual
NAME
return - Returns a shell function to its invoking script
SYNOPSIS
return [n]
DESCRIPTION
The return command causes a shell function to return to the script that started it, with the return
status specied by the argument n.
If the argument n is not specied, the return status is that of the last command executed. If the
return command is executed while not in a function or in a . (dot) script, it has the same effect as
an exit command.
NOTES
Parameter assignment lists that precede the command remain in effect when the com-
mand completes.
I/O redirections are processed after parameter assignments.
Errors cause a script that contains the commands so marked to abort.
The return 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: sh(1).
752 Hewlett-Packard Company 527188-004