if [ $( echo "5.5 > 10.5" | bc ) -eq 1 ]; then
echo 5.5 is greater than 10.5.
else
echo 5.5 is NOT greater than 10.5.
fi
=> 5.5 is NOT greater than 10.5.
Thursday, January 22, 2009
Float/Real Number Comparison
Posted by techgeek168 at 8:41 AM
Labels: UnixBashVi
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment