[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:
>Blair,
>
>Would this -
>
>if test ! -z $variable; then
> do stuff
>fi
>
>work and be better then
>
>
>
>>if test "`echo $variable`" != ""; then
>>do stuff
>>fi
>>
>>
>
>Notice no "" around $variable.
>
>
This little test
a=" "
if test ! -z $a; then
echo not empty
fi
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.
Regards,
Blair
--
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