MPE/iX Shell and Utilities Reference Manual, Vol 2

return(1) MPE/iX Shell and Utilities return(1)
NAME
return — return from shell function or . (dot) script
SYNOPSIS
return [expression]
DESCRIPTION
return returns from a shell function or . (dot) script. The exit status is the value of expres-
sion. The default value of expression is the exit status of the last command executed.
DIAGNOSTICS
The current function or script returns the value of expression.Ifnoexpression is given, the
exit status is the exit status of the last command executed.
Messages
Because this utility is built into the
MPE/iX Shell, see the sh(1) man page for a complete list of
error messages that you may receive when using it.
PORTABILITY
POSIX.2. x/OPEN Portability Guide 4.0.
return is a built-in command of the Bourne Shell and KornShell on
UNIX systems.
Allowing an expression, rather than just a number, is an extension found in the KornShell.
NOTE
This is a special built-in command of the shell.
SEE ALSO
exit(1), sh(1)
1-486 Commands and Utilities