netlearner
MIS
Hi,
I am trying to do division to get percentage. I have used bc to get the float number like 60.0.
however, later on i cant use this same variable in IF statment to make comparison for less than 70. Can anyone help me with this.
Percentage=$(echo "scale=1;(( $Rcount / $Fcount ) * 100 )" | bc )
if [ $Percentage -lt 70 ]
then
echo $Percentage
fi