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/command-grouping.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/bash/command-grouping.html')
| -rw-r--r-- | devdocs/bash/command-grouping.html | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/devdocs/bash/command-grouping.html b/devdocs/bash/command-grouping.html deleted file mode 100644 index abb18c59..00000000 --- a/devdocs/bash/command-grouping.html +++ /dev/null @@ -1,13 +0,0 @@ -<h1 class="subsubsection">Grouping Commands</h1> <p>Bash provides two ways to group a list of commands to be executed as a unit. When commands are grouped, redirections may be applied to the entire command list. For example, the output of all the commands in the list may be redirected to a single stream. </p> <dl compact> <dt><span><code>()</code></span></dt> <dd> -<div class="example"> <pre class="example">( list ) -</pre> -</div> <p>Placing a list of commands between parentheses forces the shell to create a subshell (see <a href="command-execution-environment">Command Execution Environment</a>), and each of the commands in <var>list</var> is executed in that subshell environment. Since the <var>list</var> is executed in a subshell, variable assignments do not remain in effect after the subshell completes. </p> </dd> <dt id="index-_007b"><span><code>{}</code></span></dt> <dd> - <div class="example"> <pre class="example">{ list; } -</pre> -</div> <p>Placing a list of commands between curly braces causes the list to be executed in the current shell context. No subshell is created. The semicolon (or newline) following <var>list</var> is required. </p> -</dd> </dl> <p>In addition to the creation of a subshell, there is a subtle difference between these two constructs due to historical reasons. The braces are reserved words, so they must be separated from the <var>list</var> by <code>blank</code>s or other shell metacharacters. The parentheses are operators, and are recognized as separate tokens by the shell even if they are not separated from the <var>list</var> by whitespace. </p> <p>The exit status of both of these constructs is the exit status of <var>list</var>. </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/Command-Grouping.html" class="_attribution-link">https://www.gnu.org/software/bash/manual/html_node/Command-Grouping.html</a> - </p> -</div> |
