I am confused on this topic when reading the Advanced Bash Scripting Guide. According to the book,
Bash script, when we quote a string, we set it apart and protect its literal meaning.
Escaping is a method of quoting single characters. The escape (\) preceding a character tells the shell to interpret that character literally.
\ is a "functional" character, but what if it's also put in a double quote? Will
\ be taken only as a literal or it still does escaping? For example,
echo \z # z echo "\z" # \z seems that the backslash is taken literally echo \\ # \ echo "\\" # \ so why this result is not \\ ?