.TH until "" "" Command
.PC "Execute commands repeatedly"
\fBuntil \fIsequence1 \fB[ do \fIsequence2 \fB]\fB done\fR
.PP
.HS
Both \fBdo\fR and \fBdone\fR
must be the first token on a line or preceded by `;'.
The shell executes \fBuntil\fR directly.
.HE
The shell's
.B until
loop executes the commands in
.IR sequence1 .
If the exit status is nonzero, the shell then executes the
commands in the optional
.I sequence2
and repeats the process until the exit status of
.I sequence1
is zero.
Because the shell
recognizes a reserved word only as the unquoted first word of a command, both
.B do
and
.B done
must occur either unquoted at the start of a line or preceded by `;'.
.PP
The shell commands
.B break
and
.B continue
may be used to alter control flow within an
.B until
loop.
The contruct
.B while
has the same form as
.B until
but the sense of the test is reversed.
.PP
The shell executes
.B until
directly.
.SH "See Also"
.Xr "break," break
.Xr "commands," commands
.Xr "continue," continuek
.Xr "ksh," ksh
.Xr "sh," sh
.Xr "test," test
.Xr "while" while
