I learned something the hard way so that you wouldn't have to.

Finding the most popular IPs in a log file

I found myself with a sudden need for parsing a Linux server's logs to figure out which host(s) had been slamming it with an unexpected burst of traffic. Sure, there are proper log analysis tools out there which would undoubtedly make short work of this but none of those were installed on this hardened system. So this is what I came up with. Find IP-ish strings This will get you all occurrences of things which look vaguely like IPv4 addresses: