#!/bin/sh # by Raphael H. Becker # # This little script reads a MAC-Adress from stdin and # searches for the manufactor of the NIC. This script uses # http://standards.ieee.org/regauth/oui/oui.txt for it. # This Textfile ist about some hunded of kB so this file # will be cached on the first run. FILE=~/.mac.dat URL=http://standards.ieee.org/regauth/oui/oui.txt if [ $1 ] then if [ ! -f $FILE ] then # File not found, download it (>600kB!): lynx -dump $URL >$FILE fi grep -iA4 $(echo $1|sed -e 's/:/-/g'|cut -f 1-3 -d "-") $FILE|cut -c 33- else echo "Usage: $0 " fi