Bash - Lists of Commands


A list of command is a sequence of one or more pipelines

  • separated by one of the operators: ‘;’, ‘&’, ‘&&’, or ‘||’,
  • and optionally terminated by one of ‘;’, ‘&’, or a newline.
Control Operators Definition
; (Semicolon) or newline Delimit commands, start a command sequentially
& (Ampersand) Start a command asynchronously
&& (AND) The next command is executed only if the first command returns true
|| (OR) The next command is executed if the first command doesn't return true

Same as compound list ?

Operators Precedence

Of these list operators, ‘&&’ and ‘||’ have equal precedence, followed by ‘;’ and ‘&’, which have equal precedence.

Documentation / Reference

Powered by ComboStrap