Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- result = `ipconfig /all`
- result = result.split(/\n+/)
- result.collect! do |x|
- if x[0] == " "
- if x.include? "Physical Address"
- x
- else
- nil
- end
- else
- x
- end
- end
- result.delete_if {|x| x==nil}
- puts result
- gets.chomp
Add Comment
Please, Sign In to add comment