From: Adam Hanel (hanela@BILLINGS.K12.MT.US)
Date: Fri Jun 21 2002 - 12:38:55 EDT
Does any one know how to do basic multiplication and division in Korn
shell scripting?
I have two numbers total and used. I would like to take
Total - amount = free
Then
Free / total = %used
I can do the addition and subtraction fine, but I keep getting 0 as a
result of my division.
For example
555 - 300 = 255
255 / 555 = .51
.51 * 100 = 51%
Thanks!
Adam Hanel
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:00 EDT