home *** CD-ROM | disk | FTP | other *** search
- return [ n ]
- Causes a shell function or . script to return to
- the invoking script with the return status speci-
- fied by n. If n is omitted then the return status
- is that of the last command executed.
-
- If return was executed from a trap, whether set by
- the trap builtin or by defining a TRAPxxx function,
- the effect is different for zero and non-zero
- return status. With zero status (or after an
- implicit return at the end of the trap), the shell
- will return to whatever it was previously process-
- ing; with a non-zero status, the shell will behave
- as interrupted except that the return status of the
- trap is retained. Note that the signal which
- caused the trap is passed as the first argument, so
- the statement `return $[128+$1]' will return the
- same status as if the signal had not been trapped.
-