From 1b3a763e4bb088ccd3c5776e4e39dddad3532e63 Mon Sep 17 00:00:00 2001
From: Gregory Nutt
while-do-done
and until-do-done
looping constructs are also supported.
- These works from the command line but are primarily intended for use within NSH scripts
+ These work from the command line but are primarily intended for use within NSH scripts
(see the sh
command).
- The syntax is as follows:
-
while <test-cmd>; do <cmd-sequence>; done
<cmd-sequence>
as long as <test-cmd>
has an exit status of zero.until <test-cmd>; do <cmd-sequence>; done
<cmd-sequence>
as long as <test-cmd>
has a non-zero exit status.
+
+ while-do-done
.
+ Execute [sequence of <cmd>]
as long as <cmd>
has an exit status of zero.
+ The syntax is as follows:
+
+while <cmd>
+do
+ [sequence of <cmd>]
+done
+
until-do-done
+ Execute [sequence of <cmd>]
as long as <cmd>
has a non-zero exit status.
+ The syntax is as follows:
+
+while <cmd> +do + [sequence of <cmd>] +done ++ +