parse show lldp neighbors
[dell-switch] / mac4ip.sh
1 #!/bin/sh -e
2
3 name=$1
4
5 ip=$( ping -c 1 $name | grep '^PING' | cut -d' ' -f3 )
6 /usr/sbin/arp -an | grep "\($ip\)" | awk '{ print $4 }'