Created
December 1, 2014 23:38
-
-
Save anonymous/08f79192835d16d8c24f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless ARGV.size == 1 | |
puts "Invalid number of arguments?" | |
else | |
in_file = File.new(ARGV[0], 'r') | |
in_file.each_line do |line| | |
puts line.scan((?:\d{1,3}\.){3}\d{1,3}| ) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment