Cute one liner IP intel and hit stats

We need IP intel from huge logs and we need it fast

The logs look like
n:~#cat ./apache.log |head -1
192.0.2.4 - - [27/Apr/2011:17:51:21 +0200] "GET / HTTP/1.1" 200 2150 "-" "funky browser"

The one-liner is
n:~#cat ./apache.log | awk '{print $1}' | sort | uniq -c | sort -nr | awk '{print $1",<a href="http://ipduh.com/ip/?$2">"$2"</a>
"}' > ip.htm

ip.htm looks like
23228,66.249.66.181
9358,77.88.25.28
...
hits,IP address