Problem with ash -n non-zero length string test
Mike Frysinger
vapier at gentoo.org
Sun Jul 8 00:08:17 UTC 2007
On Saturday 07 July 2007, Yann E. MORIN wrote:
> - use this: [ x$boot_drive_name = x ]
you would still need to quote $boot_drive_name to account for whitespace as
you'll get an error otherwise
also, this form:
[ "x$foo" = x ]
as a replacement for:
[ -z "$foo" ]
is common place only because of old broken shells which autotools supports ...
personally i dont think it has any place when writing POSIX compliant code
-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/20070707/875f91eb/attachment-0002.pgp
More information about the busybox
mailing list