Re: Non-portable shell code in pg_upgrade tap tests - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Non-portable shell code in pg_upgrade tap tests
Date
Msg-id 4263.1532186967@sss.pgh.pa.us
Whole thread Raw
In response to Re: Non-portable shell code in pg_upgrade tap tests  ("Tels" <nospam-pg-abuse@bloodgate.com>)
Responses Re: Non-portable shell code in pg_upgrade tap tests  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
List pgsql-hackers
"Tels" <nospam-pg-abuse@bloodgate.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


pgsql-hackers by date:

Previous
From: Marco van Eck
Date:
Subject: Re: Have an encrypted pgpass file
Next
From: Brad DeJong
Date:
Subject: grammar - src/backend/access/heap/README.tuplock