
15 Sep
2019
15 Sep
'19
12:42 a.m.
On Sat, Sep 14, 2019 at 10:02:46AM -0400, D. Hugh Redelmeier via talk wrote:
| From: William Park via talk <talk@gtalug.org>
| Hmm, minor personal irritant about variable assigment: | var=$(...) | is enough. You don't need to do | var="$(...)"
I think that getting quotes right in sh is hard. I support the simplest rule that works:
Always double-quote a $ thing UNLESS it must not be quoted.
The case you point out may be quoted, so I would quote it.
Extra quotes distract your eyes, makes it difficult to read or spot a bug. It's like always carrying an opened umbrella (because you can), when you should do it only when it rains. -- William Park <opengeometry@yahoo.ca>