keyword

Bash done keyword

Terminates a loop body; not a standalone command.

Formal Syntax & Structure

bash syntaxbash
for name in words; do commands; done

Return Value

not applicable

Terminates a loop body; not a standalone command.

Working Example

Example Snippetbash
for item in alpha beta gamma; do  printf '%s\n' "$item"done
Bash Reference