summaryrefslogtreecommitdiff
path: root/devdocs/bash/looping-constructs.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
committerCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
commit82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch)
tree158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/bash/looping-constructs.html
parent9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff)
downloaddotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz
dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/bash/looping-constructs.html')
-rw-r--r--devdocs/bash/looping-constructs.html18
1 files changed, 0 insertions, 18 deletions
diff --git a/devdocs/bash/looping-constructs.html b/devdocs/bash/looping-constructs.html
deleted file mode 100644
index 9b70c86c..00000000
--- a/devdocs/bash/looping-constructs.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<h1 class="subsubsection">Looping Constructs</h1> <p>Bash supports the following looping constructs. </p> <p>Note that wherever a ‘<samp>;</samp>’ appears in the description of a command’s syntax, it may be replaced with one or more newlines. </p> <dl compact> <dt id="index-until"><span><code>until</code></span></dt> <dd>
- <p>The syntax of the <code>until</code> command is: </p> <div class="example"> <pre class="example">until test-commands; do consequent-commands; done
-</pre>
-</div> <p>Execute <var>consequent-commands</var> as long as <var>test-commands</var> has an exit status which is not zero. The return status is the exit status of the last command executed in <var>consequent-commands</var>, or zero if none was executed. </p> </dd> <dt id="index-while"><span><code>while</code></span></dt> <dd>
-<p>The syntax of the <code>while</code> command is: </p> <div class="example"> <pre class="example">while test-commands; do consequent-commands; done
-</pre>
-</div> <p>Execute <var>consequent-commands</var> as long as <var>test-commands</var> has an exit status of zero. The return status is the exit status of the last command executed in <var>consequent-commands</var>, or zero if none was executed. </p> </dd> <dt id="index-for"><span><code>for</code></span></dt> <dd>
-<p>The syntax of the <code>for</code> command is: </p> <div class="example"> <pre class="example">for name [ [in [words …] ] ; ] do commands; done
-</pre>
-</div> <p>Expand <var>words</var> (see <a href="shell-expansions">Shell Expansions</a>), and execute <var>commands</var> once for each member in the resultant list, with <var>name</var> bound to the current member. If ‘<samp>in <var>words</var></samp>’ is not present, the <code>for</code> command executes the <var>commands</var> once for each positional parameter that is set, as if ‘<samp>in "$@"</samp>’ had been specified (see <a href="special-parameters">Special Parameters</a>). </p> <p>The return status is the exit status of the last command that executes. If there are no items in the expansion of <var>words</var>, no commands are executed, and the return status is zero. </p> <p>An alternate form of the <code>for</code> command is also supported: </p> <div class="example"> <pre class="example">for (( expr1 ; expr2 ; expr3 )) ; do commands ; done
-</pre>
-</div> <p>First, the arithmetic expression <var>expr1</var> is evaluated according to the rules described below (see <a href="shell-arithmetic">Shell Arithmetic</a>). The arithmetic expression <var>expr2</var> is then evaluated repeatedly until it evaluates to zero. Each time <var>expr2</var> evaluates to a non-zero value, <var>commands</var> are executed and the arithmetic expression <var>expr3</var> is evaluated. If any expression is omitted, it behaves as if it evaluates to 1. The return value is the exit status of the last command in <var>commands</var> that is executed, or false if any of the expressions is invalid. </p>
-</dd> </dl> <p>The <code>break</code> and <code>continue</code> builtins (see <a href="bourne-shell-builtins">Bourne Shell Builtins</a>) may be used to control loop execution. </p><div class="_attribution">
- <p class="_attribution-p">
- Copyright &copy; 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/Looping-Constructs.html" class="_attribution-link">https://www.gnu.org/software/bash/manual/html_node/Looping-Constructs.html</a>
- </p>
-</div>