grep ‘Googlebot’ access.log | cut -d' ' -f1 | sort | uniq

Fantastic little command.

via » How to extract uniq IPs from apache via grep, cut, and uniq Dan Collis-Puro.