Something else you could do using raytrace's answer. You could use the stdout of another shell call using backticks to then do some calculations. For instance I wanted to know the file size of the top 100 lines from a couple of files. The original size from wc -c is in bytes, I want to know kilobytes. Here's what I did:
I also had the same problem. It's easy to divide integer numbers but decimal numbers are not that easy.
if you have 2 numbers like 3.14 and 2.35 and divide the numbers then,
the code will be Division=echo 3.14 / 2.35 | bc
echo "$Division"
the quotes are different. Don't be confused, it's situated just under the esc button on your keyboard.
THE ONLY DIFFERENCE IS THE | bc and also here echo works as an operator for the arithmetic calculations in stead of printing.
So, I had added echo "$Division" for printing the value. Let me know if it works for you. Thank you.