[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: when postgrey 1.21-2 in volatile?



This one time, at band camp, martin f krafft said:
> also sprach Stephen Gran <sgran@debian.org> [2006.03.01.1123 +0100]:
> > Just being nitpicky, but why the double brackets?  Isn't this more
> > POSIXly correctly expressed as 
> > if [ -z "$POSTGREY_TEXT" ]; then
> > ?
> 
> Agreed. Double brackets require bash or zsh. But you don't need
> quotes in the above. IIRC, [ -z $POSTGREY_TEXT ] is posixly correct.

It's almost always better to quote variables that you are testing -
interesting things can happen because of embedded whitespace for
instance.  Of course if you are really paranoid, falling back to the old
standby:
if [ "x${POSTGREY_TEXT}" = 'x' ]; then
is best.

Take care,
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran@debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature


Reply to: