Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. 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
  2. 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)
  3. 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
Command options
Command options

...