I have a file with a long string in the following format:

/vol/dept115345K111455K/vol/home1156668K507768K...ad finitum.

How do I iterate through the string comparing dividing the second number
by the first number and only print the output if the number is 90% or
more?  Basically the first number is total space and the second number
is used space.  If the comparison is 90% or more, then print the vol
name /vol/dept(etc.) along with the %.  If the comparison is less than
90% then don't print it at all.  In other words using the two above I
would get

/vol/dept 96.6%


I am sure this is easy but I can't get my head around it.


TIA,
JR

-- 
Posted via http://www.ruby-forum.com/.