On 09/07/2010 08:24 AM, Stefano Lattarini wrote:
Hello autoconfers. Is anyone aware of this ridicoulous bug of Solaris 10 /bin/ksh?
The manual already documents that it is non-portable:
Posix also says that @samp{test ! "@var{string}"}, @samp{test -n "@var{string}"} and @samp{test -z "@var{string}"} work with any string, but many shells (such as Solaris, AIX 3.2, UNICOS 10.0.0.6, Digital Unix 4, etc.)@: get confused if @var{string} looks like an operator:
Therefore,
$ /bin/ksh -c 'test -z ")"; echo $?' # ready to laugh or cry? 0
this is yet another case of @var{string} that looks like an operator, and yet another reason that you should ALWAYS use test x"$val" = x rather than test -z "$val" if you don't know what $val contains.
But yes, giving this particular example in the manual would be helpful. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf