The return builtin command

return [N]

The return command returns from a shell function.

If N is given, the return code to the caller is set to N. If not, the returned status the the status of the most recently executed command (i.e. $?).

There are no options.

If everything is okay, the return command doesn't come back. If it comes back, there was a problem in doing the return.

Status Reason
1 return was called while not being in a shell function or sourced file
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
You could leave a comment if you were logged in.
  • commands/builtin/return.txt
  • Last modified: 2015/11/16 04:43
  • by thebonsai