Last active
November 11, 2015 23:47
-
-
Save artynet/d9d6f3ed62af81b18f05 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PRINTS MAC ADDRESS OF ETH0 | |
ifconfig eth0 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | |
cat /sys/class/net/eth0/address | |
cat /sys/class/net/wlan0/address | |
PRINT LAST FOUR DIGITS OF THE ABOVE MAC ADDRESS | |
ifconfig eth0 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | tail -c 6 | sed s/://g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment