Re: When scripting, which is better? - Mailing list pgsql-hackers

From Adrian Phillips
Subject Re: When scripting, which is better?
Date
Msg-id 87d747tmrh.fsf@grannyogg.localnet
Whole thread Raw
In response to When scripting, which is better?  (Justin Clift <justin@postgresql.org>)
List pgsql-hackers
>>>>> "Justin" == Justin Clift <justin@postgresql.org> writes:
   Justin> if [ x"$foo" = x"" ]; then
   Justin> or
   Justin> if [ "$op" = "" ]; then
   Justin> or
   Justin> if [ "$foo" ]; then

I'm not the slightest bit a shell expert, but why not :-

if [ -z "$foo" ]; then

Is this POSIX/SUS2/whatever ?

Sincerely,

Adrian Phillips

-- 
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]


pgsql-hackers by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: [PHP] [BUGS] PostgreSQL / PHP Overrun Error
Next
From: Bruce Momjian
Date:
Subject: Re: developer's faq