Lookup hardware manufacturers by MAC address
#!/usr/bin/env bash
# Lookup MAC address owners via http://standards.ieee.org/develop/regauth/oui/public.html
# parameter is in triple octet form, e.g. CC-6D-A0
set -o errexit
set -o nounset
mac=${1//:/-}
url="https://services13.ieee.org/RST/standards-ra-web/rest/assignments/download/?registry=MA-L&format=html&text=$mac"
if command -v lynx >/dev/null 2>&1; then
#if you have lynx installed
curl --silent --fail --show-error "$url" | lynx -stdin -dump -nolist
else
curl --silent --fail --show-error "$url"
fi
exit $?