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 token
    • it tells the shell not to "look inside" the quotes to perform any evaluation
      • all metacharacters inside the single quotes are ignored
      • in particular, any environment variables in single-quoted text are not evaluated
  2. double quoting (e.g. "some text") – also serves two purposes
    • it groups together all text inside the quotes into a single token
    • it allows environment variable evaluation, but inhibits some metacharcters
      • e.g. asterisk ( * ) pathname globbing (more on globbing later...)
      • and some other metacharacters
    • double quoting also preserves any special characters in the text
      • e.g. newlines (\n) or Tabs (\t)
  3. backtick quoting (e.g. `date`)
    • evaluates the expression inside the backtick marks ( ` )
    • the standard output of the expression replaces the text inside the backtick marks ( ` )

...