> For the complete documentation index, see [llms.txt](https://woodrowpearson.gitbook.io/code-gists/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://woodrowpearson.gitbook.io/code-gists/bash/compound-commands-bash-reference-manual.md).

# Compound Commands (Bash Reference Manual)

## 3.2.4 Compound Commands

Compound commands are the shell programming language constructs. Each construct begins with a reserved word or control operator and is terminated by a corresponding reserved word or operator. Any redirections (see [Redirections](/code-gists/bash/redirections-bash-reference-manual.md#Redirections)) associated with a compound command apply to all commands within that compound command unless explicitly overridden.

In most cases a list of commands in a compound command’s description may be separated from the rest of the command by one or more newlines, and may be followed by a newline in place of a semicolon.

Bash provides looping constructs, conditional commands, and mechanisms to group commands and execute them as a unit.
