summaryrefslogtreecommitdiff
path: root/apps/nshlib/README.txt
diff options
context:
space:
mode:
Diffstat (limited to 'apps/nshlib/README.txt')
-rw-r--r--apps/nshlib/README.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/nshlib/README.txt b/apps/nshlib/README.txt
index 11d692dc1..1e4731066 100644
--- a/apps/nshlib/README.txt
+++ b/apps/nshlib/README.txt
@@ -104,6 +104,23 @@ Conditional Command Execution
[sequence of <cmd>]
fi
+Looping
+^^^^^^^
+
+ 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 (see the sh command). The syntax is as follows:
+
+ while <test-cmd>; do <cmd-sequence>; done
+
+ Execute <cmd-sequence> as long as <test-cmd> has an exit status of
+ zero.
+
+ until <test-cmd>; do <cmd-sequence>; done
+
+ Execute <cmd-sequence> as long as <test-cmd> has a non-zero exit
+ status.
+
Built-In Variables
^^^^^^^^^^^^^^^^^^