-
- return - return from a function or dot script
-
- return [ options ] [n]
-
- return is a shell special built-in that causes the function or dot script that invokes it to exit. If return is invoked outside
of a function or dot script it is equivalent to exit.
- If return is invoked inside a function defined with the function reserved word syntax, then any EXIT trap set within the
then function will be invoked in the context of the caller before the function returns.
- If n is given, it will be used to set the exit status.
-
- If n is specified, the exit status is the least significant eight bits of the value of n. Otherwise, the exit status is the exit
status of preceding command.
-
- break(1), exit(1)
-
- version
- return (AT&T Research) 1999-07-07
- author
- David Korn <dgk@research.att.com>
- copyright
- Copyright © 1982-2010 AT&T Intellectual Property
- license
- http://www.opensource.org/licenses/cpl1.0.txt