Guest User

Untitled

a guest
May 7th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. result = `ipconfig /all`
  2.  
  3. result = result.split(/\n+/)
  4.  
  5. result.collect! do |x|
  6.  
  7. if x[0] == " "
  8. if x.include? "Physical Address"
  9. x
  10. else
  11. nil
  12. end
  13. else
  14. x
  15. end
  16. end
  17.  
  18. result.delete_if {|x| x==nil}
  19.  
  20. puts result
  21.  
  22. gets.chomp
Add Comment
Please, Sign In to add comment