This morning I needed to read from a file line by line from the bottom. In PHP. Perl, of course, has a module to do this. A quick view source decided that I didn’t want to get into file seeks before breakfast. Very happy with my solution:

Been a while since I dug into my aggregator stats (intrigued by FeedBurner mentioning their tracking 2000 aggregators), and while I’ve got my Perl script, but I was alarmed to realize that I had forgotten the shell for doing the equivalent.

So killing time waiting for J I re-created it. Assumes you’re using Apache’s “full” log format (and that your feed is “index.rdf”)

Returns a count of unique IPs per User-Agent. Tack on a little awk to get aggregate counts.

| awk '{sum += $1; print sum}'

Of course folks like Bloglines, Rojo, Yahoo FeedSeeker, Feedster, and FeedLounge (among others I’m sure) are rolling up the user counts. Of course FeedLounge and FeedSeeker are counted multiple times as they add time sensitive info to their User-Agent (that has got to be against some best practices!), and Bloglines comes from a couple of different IPs.

Interestingly, Google Desktop is showing up as generating not only the highest number of hits, but the highest number of 200s.