Protecting Against Bots

Commond to find all ip address related to a bot, example amazonbot:
cat access.log | grep amazonbot | awk '{print $1}' | sort -n | uniq -c | sort -nr