Comfortable search the arpwatch database

If you use arpwatch to track what is going on in your network you will eventually search for an IP or MAC address in the arp.dat file. Here is a simple bash script which gives a nicer output than just using grep and it also converts the unix timestamp to a more human friendly format:

#!/bin/bash

cat /var/lib/arpwatch/arp.dat | grep $1 |  awk  '{$3=strftime("%Y-%m-%d %H:%M:%S", $3);printf "%-20s %-20s %s %s\n",$1,$2,$3,$4}'