Re: Non-portable shell code in pg_upgrade tap tests

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tels" <nospam-pg-abuse(at)bloodgate(dot)com>
Cc: "Victor Wagner" <vitus(at)wagner(dot)pp(dot)ru>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Non-portable shell code in pg_upgrade tap tests
Date: 2018-07-21 15:29:27
Message-ID: 4263.1532186967@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Tels" <nospam-pg-abuse(at)bloodgate(dot)com> writes:
> + *) if [ `find ${PGDATA} -type f ! -perm 640 | wc -l` -ne 0 ]; then

> Shouldn't ${PGDATA} in the above as argument to find be quoted, otherwise
> the shell would get confused if it contains spaces or other special
> characters?

Hmm. Yeah, probably. I don't think this script is meant to be run with
arbitrary values of PGDATA, but most of the other uses are quoted, so
for consistency's sake this should be too.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brad DeJong 2018-07-21 16:34:40 grammar - src/backend/access/heap/README.tuplock
Previous Message Marco van Eck 2018-07-21 12:44:25 Re: Have an encrypted pgpass file