[Orca-users] orca 0.27 make error on Solaris 9

Blair Zajac blair at orcaware.com
Mon Aug 30 15:11:49 PDT 2004

Dmitry Berezin wrote:

>Would this -
>if test ! -z $variable; then
>  do stuff
>work and be better then
>>if test "`echo $variable`" != ""; then
>>do stuff
>Notice no "" around $variable.

This little test

a="    "
if test ! -z $a; then
        echo not empty

works fine using /bin/sh on Linux, but with Solaris' /bin/sh, I get this:

test.sh: test: argument expected

so it doesn't work.  I think the echo is the most portable, easy way to 
solve this problem.


Blair Zajac <blair at orcaware.com>
Plots of your system's performance - http://www.orcaware.com/orca/

More information about the Orca-users mailing list