Quoting
Quoting
- Escaping character (Backslash, \) preserves the literal value of the next character that follows
Exception: \<newline>: line continuation
- Single Quote (') preserves the literal value of each character within the quotes
Sigle quotes can't be nested.
- Double Quotes (") preserves the literal value of all characters within the quotes, with the exception of '$', '`', and '\'
- ANSI-C Quoting (\c) eg. \a, \b, \t, \n,...
Examples
bash$ echo *
bash$ echo \*
bash$ echo "*"
bash$ a=Hello
bash$ echo $a
bash$ echo \$a
bash$ echo "$a"
bash$ echo '$a'