' Anti-quote ' ' single quote ' ' double quotation mark '
1. Three symbols, anti-quote This is very special, I use a lot in the shell script, its function is to directly refer to the result of a command.
Let's take the example, Rpm-qf ' which vim ' you can split this command into two parts, which vim can find the absolute path of the VIM command/usr/bin/vim, and then rpm-qf/usr/bin/vim so that you can find vim this Which package the command is installed from. Because RPM has to be checked by an absolute path.
Single and double quotation marks, often used on special characters, are common in grep sed awk, where single quotes are more powerful than double quotes, which can simply kill the original meaning of some special symbols . Example:
A=1; echo "A is $a"
A=1; Echo ' A is $a '
You can see that the double quotes answer is correct, and the single quotation marks are not correct.
Three the difference and usage of quotation marks