Execute consequent-commands as long as test-commands has an exit status of zero
Syntax while test-commands; do consequent-commands; done
The while command continuously executes the do consequent-commands as long as the last command in test-commands returns an exit status of zero.
The return status is the exit status of the last command executed in consequent-commands, or zero if none were executed.
This is a BASH shell builtin, to display your local syntax from the bash prompt type: help while
“Men talk of killing time, while time quietly kills them” ~ Dion Boucicault
Related linux commands:
case - Conditionally perform a command.
for - Expand words, and execute commands.
if - Conditionally perform a command.
until - Execute commands (until error).
Equivalent Windows commands: IF - Conditionally perform a command.