unary operator expected, if condition test error.

Hi All,

I'm assigning a numeric value to variable count=2, well its being assigned by code above the if condition.

I want to test for 2 conditions , when $count = 0 or $count <=2 and do something when the condition matches. here is my code, but i run into the infamous :[ Unary operator expected.

if [[ $count = 3 || $count <=2 ]]
then 
    echo "cheers"
else 
    echo "exiting"
fi

I've tried combinations in the if clause like but same error. 
OS is solaris 5.10 . 


 
if [ $count = 3 -o $count <=2 ]

[/CODE]

if [ $count = 3 -o $count <= 2 ]

(space after the 2), still the same error?

oops that was typo on my part. i fixed it now