One of the problems using bash is the numeric equivalence of boolean values
#!/bin/sh
 function zero()
 {
 return 0
 }
function one()
 {
 return 1
 }
#main section
 if zero ;
 then
 echo "0 is true"
 fi
 if one ;
 then
 echo "1 is true"
 fi
and the output is:
0 is true