mac=$(ifconfig |grep ether |sed 's/^.*ether//' |sed 's/^.//' |sed s/://g | cut -c1-12 | tr [a-z] [A-Z])
if [ -z "$mac" ]
then
mac=$(ifconfig |grep HWaddr |sed 's/^.*HWaddr//' |sed 's/^.//' |sed s/://g | cut -c1-12 | tr [a-z] [A-Z])
fi
echo $mac
