Re:Ask HN: How can I get better at bash?
by koala_man on Monday June 26, 2017 @05:41PM
(#14640620)
The behavior of quotes can and should be described in terms of how they affect the words they expand to (i.e. the argv you build), so yes, it clarifies all this.
For example, all the various wrong ways of quoting var="My File.txt" or otherwise incorrectly using such a name will result in variations on a wrong argument list:
For example, all the various wrong ways of quoting var="My File.txt" or otherwise incorrectly using such a name will result in variations on a wrong argument list:
Meanwhile, all the correct ones result in the same, correct argv: If you don't know which argument list you're aiming for, you basically have to go by guesswork and superstitions.