Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgtpA-00062q-Ja for pgsql-hackers@arkaria.postgresql.org; Sat, 21 Jul 2018 15:29:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fgtp8-0005CI-NR for pgsql-hackers@arkaria.postgresql.org; Sat, 21 Jul 2018 15:29:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgtp8-0005CB-GP for pgsql-hackers@lists.postgresql.org; Sat, 21 Jul 2018 15:29:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgtp5-0007gU-LG for pgsql-hackers@postgresql.org; Sat, 21 Jul 2018 15:29:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w6LFTRPZ004264; Sat, 21 Jul 2018 11:29:27 -0400 From: Tom Lane To: "Tels" cc: "Victor Wagner" , "pgsql-hackers" Subject: Re: Non-portable shell code in pg_upgrade tap tests In-reply-to: References: <20180720153820.69e9ae6c@fafnir.local.vm> <17833.1532096747@sss.pgh.pa.us> <20180720175508.07776219@fafnir.local.vm> Comments: In-reply-to "Tels" message dated "Fri, 20 Jul 2018 17:18:13 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4262.1532186967.1@sss.pgh.pa.us> Date: Sat, 21 Jul 2018 11:29:27 -0400 Message-ID: <4263.1532186967@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Tels" 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