in
Shell keyword separating the loop variable from the list in for and select loops
TLDR
SYNOPSIS
for name in [words ...]; do commands; doneselect name in [words ...]; do commands; done
DESCRIPTION
in is a reserved word of the POSIX shell grammar, used as a delimiter between the loop variable and the word list in for and select compound commands and in case statements. It is not a standalone program and cannot be invoked directly; shells such as bash, zsh, dash, and ksh parse it as part of the surrounding control structure.Inside a for loop, the variable named before in is assigned successively to each word produced by the list after in (which may be literal words, glob expansions, command substitutions, or parameter expansions). When the word list is omitted entirely, the loop iterates over the positional parameters "$@".
CAVEATS
in is a keyword, not an executable; `which in` will typically return nothing. It has no flags or options of its own. Behavior depends on the surrounding shell construct and on POSIX quoting/expansion rules.
HISTORY
in comes from the Bourne shell and has been part of the POSIX shell specification since its inception. It is inherited by all POSIX-compatible shells including bash, ksh, zsh, and dash, and by the C shell family in similar form.
