mirror of
https://github.com/rawiriblundell/wiki.bash-hackers.org
synced 2024-11-02 09:03:06 +01:00
35 lines
1003 B
Markdown
35 lines
1003 B
Markdown
# Bash compound commands
|
|
|
|
The main part of Bash's syntax are the so-called **compound commands**.
|
|
They're called like that because they use "real" commands ([simple
|
|
commands](/syntax/basicgrammar#simple_commands) or
|
|
[lists](/syntax/basicgrammar#lists)) and knit some intelligence around
|
|
them. That is what the essential "Bash language" is made of.
|
|
|
|
## Command grouping
|
|
|
|
- grouping: [command grouping](grouping_plain)
|
|
- grouping again: [command grouping in a subshell](grouping_subshell)
|
|
|
|
## Conditional reactions
|
|
|
|
Note that conditionals can also be scripted using
|
|
[list](/syntax/basicgrammar#lists), which are syntax elements, not
|
|
commands.
|
|
|
|
- the "new" test command: [conditional
|
|
expression](conditional_expression)
|
|
- if-clause: [conditional branching](if_clause)
|
|
- case statement: [pattern-based branching](case)
|
|
|
|
## Loops
|
|
|
|
- [classic for-loop](classic_for)
|
|
- [C-style for-loop](c_for)
|
|
- [while loop](while_loop)
|
|
- [until loop](until_loop)
|
|
|
|
## Misc
|
|
|
|
- math: [arithmetic evaluation](arithmetic_eval)
|