a=1.6
b=6.1
c=`echo "$a > $b" | bc`
然後,如果 $c 是 1 ,那就成立,否則不成立。

 

 

参考:

http://ju.outofmemory.cn/entry/62675