The anti-quote bit (') is located above the TAB key of the keyboard, to the left of the 1 key. Note the difference between the single quotation mark (') on the left side of the ENTER key.
Plays the role of command substitution in Linux. Command substitution refers to the ability of the shell to interpolate the standard output of a command anywhere on a command line.
as follows, the shell executes the date command in the anti-quotation marks and inserts the result into the content displayed by the echo command.
[Email protected] sh]# echo the date is ' date '
The date is Monday, March 14, 2011 21:15:43 CST
Single and double quotes are used for the user to assign a string with a space to the variable's delimiter.
[Email protected] sh]# str= "Today is Monday"
[Email protected] sh]# echo $str
Today is Monday
If there is no single or double quotation marks, the shell interprets the string after the space as a command.
[Email protected] sh]# Str=today is Monday
Bash:is:command not found
The difference between single and double quotation marks. Single quotes tell the shell to ignore all special characters, while double quotes ignore most, but do not include $, \, '.
[Email protected] sh]# testvalue=100
[Email protected] sh]# echo ' The TestValue is $testvalue '
The TestValue is $testvalue
[Email protected] sh]# echo "The TestValue is $testvalue"
The TestValue is 100
Back quotes, single quotes, double quotes in the Linux Shell