keyword

Bash in keyword

Introduces an explicit word list in a for loop; also used in select and case grammar. Not a standalone executable command.

Formal Syntax & Structure

bash syntaxbash
for name in words; do commands; done

Return Value

not applicable

Introduces an explicit word list in a for loop; also used in select and case grammar. Not a standalone executable command.

Working Example

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