[Swan-dev] please use more double quotes in shell scripts!
Andrew Cagney
andrew.cagney at gmail.com
Sat Jul 28 19:49:17 UTC 2018
On Sat, 28 Jul 2018 at 13:26, D. Hugh Redelmeier <hugh at mimosa.com> wrote:
>
> | From: Andrew Cagney <andrew.cagney at gmail.com>
>
> | > -webdir=$(cd $(dirname $0) && pwd)
> | > +webdir="$(cd "$(dirname $0)" && pwd)"
> |
> | Actually, no. In this context, the outer quotes are not needed
>
> True.
>
> | and
> | should not be used.
>
> Why?
> | When this was was explained to me, it came with
> | the phrase common beginner's mistake :-).
>
> I don't see why it is a mistake. Redundant, yes.
SH scripts should look like SH scripts. All the redundant quotes make
for something the hen's been scratching.
More information about the Swan-dev
mailing list