5 test -z "$host" && echo "Usage: $0 hostname" && exit 1
10 mac=`sudo arp -a | grep $host | cut -d' ' -f4 | sort -u`
11 grep -r -i $mac /dev/shm/snmp-mac-port/ | tee /dev/shm/port.$host | egrep -v '(23|24|48|49)$' # remove trunk ports
13 echo "# "`cat /dev/shm/port.$host | cut -d: -f2- | cut -d' ' -f1 | sort -u | wc -l`" switches have $host mac $mac"