Last active
September 20, 2017 10:55
-
-
Save jrjhealey/2144fa36a0c7504ee2ae691af36cf5a1 to your computer and use it in GitHub Desktop.
Get wireless and ethernet MAC addresses.
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
#!/bin/bash | |
ethernet=$(ifconfig en0 | awk '/ether/{print $2}') | |
wifi=$(ifconfig en1 | awk '/ether/{print $2}') | |
echo "Ethernet MAC Address: $ethernet" | |
echo "Wifi MAC Address: $wifi" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment