Summary
In this chapter, you looked at three types of quoting and when to use them:
Backslash
Single quote
Double quote
In addition, you learned several quoting rules:
A backslash takes away the special meaning of the character that follows it.
The character doing the quoting is removed before command execution.
Single quotes remove the special meaning of all enclosed characters.
Quoting regular characters is harmless.
A single quote cannot be inserted within a single quoted string.
Double quotes remove the special meaning of most enclosed characters.
Quoting can ignore word boundaries.
Different types of quoting can be combined in one command.
Quote spaces to embed them in a single argument.
Quote the newline to continue a command on the next line.
Use ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access