First page Back Continue Last page Graphics
Loops: The while and until statements (Pages 907 – 912)
The do-done loop is executed as long as command returns a value of zero (the same as true from $?).
while command; do
statements
done
until is the opposite of while, and executes as long as command returns a non-zero value (false or error from $?).
until command; do
statements
done