mirror of
https://github.com/rawiriblundell/wiki.bash-hackers.org
synced 2024-11-02 00:53:07 +01:00
1.1 KiB
1.1 KiB
====== The until loop ======
===== Synopsis =====
until ; do
done
===== Description ===== The until-loop is relatively simple in what it does: it executes the command list '''' and if the exit code of it was not 0 (FALSE) it executes ''''. This happens again and again until '''' returns TRUE.
This is exactly the opposite of the while loop.
:!: Like all loops (both ''for''-loops, ''while'' and ''until''), this loop can be
- terminated (broken) by the ''break'' command, optionally as ''break N'' to break ''N'' levels of nested loops
- forced to immediately do the next iteration using the ''continue'' command, optionally as ''continue N'' analog to ''break N''
==== Return status ====
The return status is the one of the last command executed in '''', or ''0'' (''TRUE'') if none was executed.
===== Examples =====
===== Portability considerations =====
===== See also =====
- Internal: The while loop