| Start | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Double quotes for variable and command substitution Variable substitutions should only be used inside double quotes. Outside of double quotes, The same applies to command substitutions: Command substitutions get their own quoting contexts. Writing arbitrarily nested substitutions is easy because the parser will keep track of nesting depth instead of greedily searching for the first Variable arguments to a command substitution should be double-quoted inside the expansions as well: |
||||||||||||||
Difference between double quote and single quote
Properties that are common to both:
Examples: |
||||||||||||||
| Newlines and control characters A newline can be included in a single-string or double-quoted string. Note that backslash-newline does not result in a newline, the line break is ignored. Inside dollar-quote strings, backslash-letter or backslash-octal can be used to insert control characters, like in many other programming languages. |
||||||||||||||
| Quoting literal text All the examples in this paragraph print the line A backslash quotes the next character, i.e. the next character is interpreted literally. The one exception is a newline: backslash-newline expands to the empty string. All text between single quotes (forward quotes Dollar-single-quote starts a string literal Double quotes Interactively, beware that Syntax
|
Read Article
https://develop.horje.com/learn/1434/reference