|
Please reply back to your original thread, do not make new threads when replying. This thread now makes no sense by itself!
As far as quotes go, it is very simple. You have 3 flavors, ' (single quote), " (double quote), and ` (back quote). The back quote is the key immediately to the left of the '1' key on a standard US keyboard.
Anything surrounded by single quotes is a What you see is what you get quote. Meaning, the shell does not expand any variables inside of single quotes.
Example:
#Given the variable FOO which is set to BAR.
FOO=BAR
echo 'This will print $FOO on the screen'
This will print $FOO on the screen
Using Double quotes will cause the variable to be interpolated.
FOO=BAR
echo 'This will print $FOO on the screen'
This will print BAR on the screen
The back ticks ` cause execution of the command sequence inside of the backquotes before assignment to a variable is made.
Example:
Given a user named iamyou
FOO=`whoami`
echo $FOO
iamyou
|