On Thu, Aug 28, 2003 at 02:37:13PM -0400, Aaron M. Ucko wrote: > X Strike Force SVN Admin <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] | with such a minor version bump. http://people.debian.org/~branden/ | -- Manoj Srivastava
pgptk0M1dHWFS.pgp
Description: PGP signature