Four spellings of one variable — type all four and watch the results diverge
Four spellings of one variable — type all four and watch the results diverge
Answer
echo $HOME echo "$HOME" echo '$HOME' echo \$HOME
Lines 1 and 2 print the value; lines 3 and 4 print the five literal characters. The difference between 1 and 2 only shows up when the value contains a space — then line 1 passes several arguments and line 2 passes one.
Sarwar & Koretsky 3e ch2 §2.9; ch7 §7.5