The WHILE Statement

The while command in the UNIX shell brackets the repeated commands with the keywords do and done. The built-in while command does not use the do keyword, and ends while statements with the endwhile keyword.

Built-in version UNIX shell version

while expression while expression

commands ... do commands


endwhile done