...
- single quoting (e.g. 'some text') – this serves two purposes
- it groups together all text inside the quotes into a single argument that is passed to the command
- it tells the shell not to "look inside" the quotes to perform any evaluations
- any environment variables in the text – or anything that looks like an environment variable – are not evaluated
- no pathname globbing (e.g. *) is performed
- double quoting (e.g. "some text") – also serves two purposes
- it groups together all text inside the quotes into a single argument that is passed to the command
- it allows environment variable evaluation (but inhibits pathname globbing)
- backtick quoting (e.g. `date`)
- evaluates the expression inside the backticks
- the resulting standard output of the expression replaces the backticked text
Control flow in bash
Bash has control flow constructs such as if and case, described at https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.html.
The conditions that can be tested for control flow (e.g. ==, !=) are described here: https://www.gnu.org/software/bash/manual/html_node/Bash-Conditional-Expressions.html
Looping constructs such as for and while are outlined here: https://www.gnu.org/software/bash/manual/html_node/Looping-Constructs.html
Using Commands
Command options
Anchor | ||||
---|---|---|---|---|
|
...