Quoted characters are expanded by own rules. A character following the escape character "\" is taken as literal. "\$" is taken as literal "$" instead of the beginning the start of a variable expansion:

$ echo \$USER

Only the sequence "\newline" has a special meaning. \newline is interpreted as line continuation:

$ echo 12\

Single quoted strings are taken always literal:

$ echo '$USER'

Double quoted strings allow parameter expansion and command substitution:

$ echo "$(echo $USER)"

"\" disables the special meaning of characters within double quotes:

$ echo "\"Oranges and lemons\""
"Oranges and lemons"

To translate special characters, ANSI-C Quoting can be used. Escape sequences between "$'...'" operator:

echo $'\n\t\\$USER'


will be translated according to the ANSI-C standard: \n - newline, \t - tab, \\ backslash.