Skip site navigation (1) Skip section navigation (2)

When scripting, which is better?

From: Justin Clift <justin(at)postgresql(dot)org>
To: PostgreSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: When scripting, which is better?
Date: 2001-10-01 13:37:37
Message-ID: 3BB871A1.948C5AA1@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi all,

Reading through the script files again, there seems to be several
different methods of doing the same thing :

i.e.  if [ -x "$self_path/postmaster" ] && [ -x "$self_path/psql" ];
then

or

if [[ -x "$self_path/postmaster" && -x "$self_path/psql" ]]; then




if [ x"$foo" = x"" ]; then

or

if [ "$op" = "" ]; then

or

if [ "$foo" ]; then


-- 
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi


Responses

pgsql-hackers by date

Next:From: Lee KindnessDate: 2001-10-01 13:40:07
Subject: Re: Bulkloading using COPY - ignore duplicates?
Previous:From: Tom LaneDate: 2001-10-01 13:36:36
Subject: Re: Bulkloading using COPY - ignore duplicates?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group