VARIABLE="$(cat /sys/class/net/$IFACE/address)"

where IFACE variable is the name of the interface currently defined by ifup or ifdown.