Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — Coherent 3.1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


while                        Command                        while




Execute commands repeatedly

while sequence1
[do sequence2]
done

The shell construct while controls a loop.  It first executes the
commands in sequence1.  If the exit status is zero, the shell ex-
ecutes  the commands  in the optional  sequence2 and  repeats the
process until  the exit status of  sequence1 is nonzero.  Because
the shell  recognizes a reserved word only  as the unquoted first
word of  a command, both do  and done must occur  unquoted at the
start of a line or preceded by `;'.

The shell  commands break and continue may be  used to alter con-
trol flow within a while  loop.  The until construct has the same
form as while, but the sense of the test is reversed.

The shell executes while directly.

***** See Also *****

break, commands, continue, sh, test, until

































COHERENT Lexicon                                           Page 1


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026