return builtin

The builtin that ends a function and sets its exit status, a number from 0 to 255, not a text value.

In more detail

To hand back text, print it and capture it with command substitution; use the status for a yes or no answer so the function can sit directly in an if. Without a number, return uses the status of the last command.

Related terms

Taught in

References