The UNTIL statement

Syntax

until condition; do
  command
done

Discussion

  • command may be a single command or multiple commands, which are either placed on different lines or divided by ; on the same line.
  • The built-in break command exits from the loop. If a parameter n is provided, then it breaks out of n nested loops.
  • The built-in continue command skip the remaining instructions in the loop, resuming with the next iteration of the loop. If a parameter n in provided, then it skips n nested loops.
  • The until loop is rarely used. The while loop is its opposite and this is actually commonly used.

2022-01-29