|Basic Linux Operations FAQ|
|Part 3 of the Linux Newbie Administrator Guide|
3.4.6 Meaning of quotesNormally, these characters are special to the shell:
\ ' " ` < > [ ] ? | ; # $ ^ & * ( ) = <Space> <Tab> <Newline>
There are four different types of quotes: backslash (\), single quotes (apostrophes, '), double quotes (quotation marks, "), and backquotes (`).
The backslash \ means: disable the special meaning of the subsequent character.
Quoting with '' (two apostrophes) means: quote exactly, disabling any special characters inside the quotes.
Quoting with "" means: disable the special characters inside the quotes except for $ ` \
The pair `` (two backquotes) means: do a command substitution inside the backquotes first. So what is inside the backquotes is executed by the shell first, and then the output is passed to the command outside the quotes. The same can also be acomplished with $(command) which nests better than backquotes.
Examples. I can create a funny directory called "*" by either \ quoting or '' quoting:
This hides the special meaning of the "*" from the shell (without the quote it would mean "all files in the current directory").