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

Re: X Strike Force SVN commit: rev 451 - trunk/debian



On Thu, Aug 28, 2003 at 02:37:13PM -0400, Aaron M. Ucko wrote:
> X Strike Force SVN Admin <branden@debian.org> writes:
> 
> > -      if [ -n "$(cat "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp")" ]; then
> > +      if [ -n "$(cat "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp" 2> /dev/null)" ]; then
> 
> Incidentally, you could just use -s here...

Actually, I'd like to retract my previous mail about this.

-n does buy me one more thing.  It evaluates to false if the file
exists, is not empty, but contains nothing but whitespace.  I like that.
This way the right thing happens if at some point the user edited the
roster file and added a bunch of blank lines to it.  This is common with
non-anal-retentive text editors and/or users.

In general principle, though, yes -- -s is the right alternative to the
above approach.

-- 
G. Branden Robinson                |    I must confess to being surprised
Debian GNU/Linux                   |    by the magnitude of incompatibility
branden@debian.org                 |    with such a minor version bump.
http://people.debian.org/~branden/ |    -- Manoj Srivastava

Attachment: pgpGkKvH2CNT9.pgp
Description: PGP signature


Reply to: