diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/bash/pipelines.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/bash/pipelines.html')
| -rw-r--r-- | devdocs/bash/pipelines.html | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/devdocs/bash/pipelines.html b/devdocs/bash/pipelines.html deleted file mode 100644 index 31a97cdf..00000000 --- a/devdocs/bash/pipelines.html +++ /dev/null @@ -1,9 +0,0 @@ -<h1 class="subsection">Pipelines</h1> <p>A <code>pipeline</code> is a sequence of one or more commands separated by one of the control operators ‘<samp>|</samp>’ or ‘<samp>|&</samp>’. </p> <p>The format for a pipeline is </p> -<div class="example"> <pre class="example">[time [-p]] [!] command1 [ | or |& command2 ] … -</pre> -</div> <p>The output of each command in the pipeline is connected via a pipe to the input of the next command. That is, each command reads the previous command’s output. This connection is performed before any redirections specified by <var>command1</var>. </p> <p>If ‘<samp>|&</samp>’ is used, <var>command1</var>’s standard error, in addition to its standard output, is connected to <var>command2</var>’s standard input through the pipe; it is shorthand for <code>2>&1 |</code>. This implicit redirection of the standard error to the standard output is performed after any redirections specified by <var>command1</var>. </p> <p>The reserved word <code>time</code> causes timing statistics to be printed for the pipeline once it finishes. The statistics currently consist of elapsed (wall-clock) time and user and system time consumed by the command’s execution. The <samp>-p</samp> option changes the output format to that specified by <small>POSIX</small>. When the shell is in <small>POSIX</small> mode (see <a href="bash-posix-mode">Bash POSIX Mode</a>), it does not recognize <code>time</code> as a reserved word if the next token begins with a ‘<samp>-</samp>’. The <code>TIMEFORMAT</code> variable may be set to a format string that specifies how the timing information should be displayed. See <a href="bash-variables">Bash Variables</a>, for a description of the available formats. The use of <code>time</code> as a reserved word permits the timing of shell builtins, shell functions, and pipelines. An external <code>time</code> command cannot time these easily. </p> <p>When the shell is in <small>POSIX</small> mode (see <a href="bash-posix-mode">Bash POSIX Mode</a>), <code>time</code> may be followed by a newline. In this case, the shell displays the total user and system time consumed by the shell and its children. The <code>TIMEFORMAT</code> variable may be used to specify the format of the time information. </p> <p>If the pipeline is not executed asynchronously (see <a href="lists">Lists of Commands</a>), the shell waits for all commands in the pipeline to complete. </p> <p>Each command in a multi-command pipeline, where pipes are created, is executed in its own <em>subshell</em>, which is a separate process (see <a href="command-execution-environment">Command Execution Environment</a>). If the <code>lastpipe</code> option is enabled using the <code>shopt</code> builtin (see <a href="the-shopt-builtin">The Shopt Builtin</a>), the last element of a pipeline may be run by the shell process when job control is not active. </p> <p>The exit status of a pipeline is the exit status of the last command in the pipeline, unless the <code>pipefail</code> option is enabled (see <a href="the-set-builtin">The Set Builtin</a>). If <code>pipefail</code> 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 ‘<samp>!</samp>’ precedes the pipeline, the exit status is the logical negation of the exit status as described above. The shell waits for all commands in the pipeline to terminate before returning a value. </p><div class="_attribution"> - <p class="_attribution-p"> - Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.<br>Licensed under the GNU Free Documentation License.<br> - <a href="https://www.gnu.org/software/bash/manual/html_node/Pipelines.html" class="_attribution-link">https://www.gnu.org/software/bash/manual/html_node/Pipelines.html</a> - </p> -</div> |
