mirror of
https://github.com/rawiriblundell/wiki.bash-hackers.org
synced 2024-12-25 14:10:42 +01:00
26 lines
1.1 KiB
Plaintext
26 lines
1.1 KiB
Plaintext
====== 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 ([[syntax:basicgrammar#simple_commands | simple commands]] or [[syntax:basicgrammar#lists | lists]]) and knit some intelligence around them. That is what the essential "Bash language" is made of.
|
|
|
|
===== Command grouping =====
|
|
* grouping: [[grouping_plain | command grouping]]
|
|
* grouping again: [[grouping_subshell | command grouping in a subshell]]
|
|
|
|
|
|
===== Conditional reactions =====
|
|
|
|
Note that conditionals can also be scripted using [[syntax:basicgrammar#lists | list]], which are syntax elements, not commands.
|
|
|
|
* the "new" test command: [[conditional_expression | conditional expression]]
|
|
* if-clause: [[if_clause | conditional branching]]
|
|
* case statement: [[case | pattern-based branching]]
|
|
|
|
===== Loops =====
|
|
* [[classic_for | classic for-loop]]
|
|
* [[c_for | C-style for-loop]]
|
|
* [[while_loop | while loop]]
|
|
* [[until_loop | until loop]]
|
|
|
|
===== Misc =====
|
|
* math: [[arithmetic_eval | arithmetic evaluation]]
|