just another one of my rumblings
Mike Frysinger
vapier at gentoo.org
Sat Apr 26 03:26:11 UTC 2008
On Friday 25 April 2008, Paul Fox 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".
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080425/6eab6a14/attachment-0002.pgp
More information about the busybox
mailing list