I have been doing integer calculation like this.
a=12
b=23
c=$((a-b))
echo $c
But, now for float numbers its is failing i read that we can do that using bc however i want to assign the result in variable at the end.
a=12.7
b=23.33
c=$((a-b)) | bc
echo $c
if [ bc <<< "$c -gt 0"] then .... fi
– Avitesh Kesharwani Mar 02 '18 at 16:15