Advertisement
sak1b

split_bug

Jun 17th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. line="10 LPU 9% 10% 781MB/7799MB 14% 6644MB/7799MB/454MB"
  2. puts line
  3. first = line.split(" ")[2].strip.gsub("%","").to_f
  4. second = line.split(" ")[3].strip.gsub("%","").to_f
  5. third = line.split(" ")[5].strip.gsub("%","").to_f
  6.  
  7.  
  8. puts first
  9. puts second
  10. puts third
  11.  
  12.  
  13. =begin
  14. ---------------------
  15. locally
  16. 9.0
  17. 10.0
  18. 14.0
  19. ----------------------
  20.  
  21.  
  22. -----------------------
  23. from the app
  24. 0.0
  25. 9.0
  26. 781.0
  27. --------------
  28. =end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement