Bash - Pipeline

Bash Liste Des Attaques Ovh


This article talks about the syntax of a Shell Pipeline in Bash

All command(s) in a pipeline are executed:

  • and started in a subshell (meaning that the environment is not passed along the way)

This page talks about pipeline (e ia command that takes the output of a command as input), a succession of a command in bash is called a list


This is the same syntax than a shell pipeline where you can add the time command

[time [-p]] pipeline]


  • time print the time statistics.
  • The -p option changes the output format to that specified by posix. The TIMEFORMAT variable may be set to a format string that specifies how the timing information should be displayed.



If the pipeline is not executed asynchronously (see Lists), the shell waits for all commands in the pipeline to complete.


Each command in a pipeline is executed as a separate process (i.e., in its own subshell). The shell waits for all commands in the pipeline to terminate before returning a value.

Exit Status

The exit status of a pipeline is the exit status of the last command in the pipeline, unless the pipefail option is enabled (see The Set Builtin).

If pipefail is enabled, the pipeline's return status is the value of the last (rightmost) command to exit with a non-zero status, or zero if all commands exit successfully.

If the reserved word ‘!’ precedes the pipeline, the exit status is the logical negation of the exit status.

Documentation / Reference

Discover More
Bash Liste Des Attaques Ovh
Bash - (Builtin|Intern|System|Reserved|Shell) variable name

Reserved variable name are named that have a special meaning for the bash shell. PS1 defines the shell's command-line prompt. HOME defines the home directory for a user. PATH defines a list...
Bash Liste Des Attaques Ovh
Bash - (Return|Exit) (Value|Status)

The return status (also known as Exit Status of Exit Code) of a simple command is its exit status as provided by: the posix 1003.1 waitpid function, or 128+n if the command was terminated by signal...
Bash Liste Des Attaques Ovh
Bash - Lists of Commands

A list of command is a sequence of one or more pipelines separated by one of the operators: ‘;’, ‘&’, ‘&&’, or ‘||’, and optionally terminated by one of ‘;’, ‘&’, or a newline....
Bash Liste Des Attaques Ovh
Bash - Read (Builtin Command) that capture a line

Read is a bash builtin command and read: by default one line or a number of characters (by option) from: the standard input, or from the file descriptor fd supplied as an argument to the...
Bash Liste Des Attaques Ovh
Bash - Redirection

Through redirection you can direct the input and output of a command to and from other files and programs, and chain commands together in a pipeline. The operator >&2 means redirect the address...
Bash Liste Des Attaques Ovh
Bash - Set (of Bash Options)

The set builtin command can be specify shell option. When options are specified, they set or unset shell attributes. Without options, the name and value of each shell variable are displayed in a...
Bash Liste Des Attaques Ovh
Bash - Subshell ()

A subshell is a process that is started in its own scoped environment and therefore does not share any variables (ie context). $(command) will capture the standard stream. Example with the capture...
Bash Liste Des Attaques Ovh
Bash - While

This article is dedicated to the while syntax in Bash. where: : is the no-op command; its exit status is always 0 The command: lists the file with the ls executable (ls -l) pipe the...
Bash Liste Des Attaques Ovh
Bash - time (Execution Time Measurement)

time is a bash reserved word to print the time statistics (elapsed (wall-clock) time and user and system time. The use of time as a reserved word permits the timing of: Bash builtins, Bash functions,...
Bash Liste Des Attaques Ovh
Bash Shell and (Unix|Linux) Utilities (XCU)

Bash is: Bourne-Again shell (Os Shell). It means that this is scripting language used in a terminal based around The articles of this section are over: the Bash (Bourne-Again Shell) the...

Share this page:
Follow us:
Task Runner