The SELECT statement

Syntax

select item [in list] ; do
    command
done

Discussion

  • command may be a single command or multiple commands, which are either placed on different lines or divided by ; on the same line.
  • The in list part is optional. See also: the PS3 entry in Other Shell Variables.
  • The built-in break command exits from the loop. If a parameter n is provided, then it breaks out of n nested loops.
  • The built-in continue command skip the remaining instructions in the loop, resuming with the next iteration of the loop. If a parameter n in provided, then it skips n nested loops.

2020–07–16