When writing a Bash script that contains messages for the user, I can write
echo Processing files...
or
echo "Processing files..."
In this and many other cases, the output will be the same. So when do I actually need double quotes, and when may they be unnecessary?
I understand that
echo This is my sentence.
and
echo "This is my sentence."
will produce different outputs (single space between words in first case, spacing retained in second case), but are there other reasons to use double quotes? Or not to use double quotes?
(I realize that single quotes have a different effect; this question is specifically about double quotes.)
${vars}
when the output is the same. Less chance that it will break after future modifications. – Walter A Mar 12 '16 at 19:04