Bash - Return - (Function|Shell) exit

Bash Liste Des Attaques Ovh

About

Return is a bash builtin function that causes to update the exit status specified by n.

Return is intended to be used only for signaling errors, not for returning the results of function.

Syntax

return [n]

If used:

  • inside a function. Return value specified by n. If n is omitted, the return status is that of the last command executed in the function body.
  • outside a function,
    • during execution of a script by the . (source) command, it causes the shell to stop executing that script and return either n or the exit status of the last command executed within the script as the exit status of the script.
    • not during execution of a script by . (source), the return status is false.

Any command associated with the RETURN trap is executed before execution resumes after the function or script.





Discover More
Bash Liste Des Attaques Ovh
Bash - Builtin Commands

builtin refers to: a builtin command. See or to the specific builtin command. See (useful when defining a function whose name is the same as a shell builtin) The builtin command execute the specified...
Bash Liste Des Attaques Ovh
Bash - Flow statement (Control Structure)

The words that control the flow of statement (ie condition and loop). help see
Bash Liste Des Attaques Ovh
Bash - Function

A shell function is an object that: is called like a simple command and executes a compound command with a new set of positional parameters. ie a function definition is itself a compound command ...
Bash Liste Des Attaques Ovh
Bash - process

This article is the bash Process. To see how to manage another general linux process, see The process running the command is created. The process inherits the stdin, stdout, and stderr from...



Share this page:
Follow us:
Task Runner