Tag Archives: mac

Mac OS version and architecture from the command line

bash-3.2# uname -a
Darwin fv 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
bash-3.2# sw_vers
ProductName: Mac OS X
ProductVersion: 10.8.3
BuildVersion: 12D78

mac address lookup with bash

This script relies on wireshark, it has to be installed

#!/bin/bash
#macaddresslookup.sh
if [[ ! $1 ]]
then echo "Usage: $0 "
exit 1
else
mac=$1
#echo ${mac:0:8}
oui=${mac:0:8}
grep -i $oui /usr/share/wireshark/manuf
fi

You can also download the file:
http://anonsvn.wireshark.org/wireshark/trunk/manuf