bash:quotes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
bash:quotes [2019/12/07 12:06] – peter | bash:quotes [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 51: | Line 51: | ||
---- | ---- | ||
- | ===== Concatinating | + | ==== Escaping Quotes |
+ | |||
+ | Putting a **backslash** character **\** in front of a quote removes its special meaning. | ||
+ | |||
+ | This works inside double quotes, or in the absence of quotes. | ||
+ | |||
+ | It does not work inside single quotes. | ||
+ | |||
+ | ==== Example ==== | ||
+ | |||
+ | <code bash> | ||
+ | echo ' | ||
+ | echo " | ||
+ | echo $' | ||
+ | </ | ||
+ | |||
+ | * **1st line: | ||
+ | * **2nd line: | ||
+ | * **3rd line: | ||
+ | |||
+ | **$(...)**-style command substitutions are unique in that the quoting of their contents is completely independent to their surroundings. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Concatenating | ||
The various types of quotes can be combined, or concatenated, | The various types of quotes can be combined, or concatenated, |
bash/quotes.1575720393.txt.gz · Last modified: 2020/07/15 09:30 (external edit)