Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- for int in `ip -o link | cut -f 2 -d" " | cut -f 1 -d:`; do
- echo "====================="
- echo Interface $int
- mac=`ip link show ${int} | grep link/ether | tr -s " " | cut -f 3 -d" "`
- if ( test $int = "lo" ) then
- mac="--loopback--"
- fi
- echo HW $mac
- macprefix=`echo ${mac} | tr ":" "." | cut -f 1-3 -d.`
- cat /var/lib/ieee-data/oui.txt | grep -i " ${macprefix}"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement