quote removal
The last expansion step, in which bash deletes the quote characters and backslashes it used, so the command never sees them.
In more detail
Quotes are instructions to the shell, not part of the data. That is why a program cannot tell whether you typed "two words" or two\ words, and why quotes stored inside a variable do nothing when the variable is expanded later.
Related terms
- shell expansion — The rewriting bash does to a command line before running it, replacing variables, patterns and other special forms with their values.
- double quotes — Quotes that keep text together as one word but still let dollar expansions and backticks work inside.
- single quotes — Quotes that make every character between them literal, so nothing inside is expanded.
Taught in
- What Bash Does To A Line Before It Runs It — Bash Scripting & Command Line Automation
- eval, And What To Use Instead — Bash Scripting & Command Line Automation