just another one of my rumblings

Lombard, David N dnlombar at ichips.intel.com
Mon Apr 28 13:40:03 UTC 2008


On Sat, Apr 26, 2008 at 08:42:43AM +0200, Denys Vlasenko wrote:
> On Saturday 26 April 2008 05:26, Mike Frysinger wrote:
> > >  > [ -n "$var" ] is clear.  [ "$var" ] is not.
> > >
> > > it's exactly analogous to "if (foo != 0)" vs. "if (foo)".
> > >
> > > it's all subjective.  i'd probably have to look up "-n".  :-)
> > 
> > i doubt it's the same.  most people who understand shell coding know what 
> > the -n test means.  i would doubt that most people know what the default 
> > behavior is if no operator is specified at all.  unlike C coders who know 
> > that "true" means "non-0".
> 
> http://en.wikipedia.org/wiki/Color_of_the_bikeshed ?

Excellent!

-- 
David N. Lombard, Intel, Irvine, CA
I do not speak for Intel Corporation; all comments are strictly my own.



More information about the busybox mailing list