Skip to content

Instantly share code, notes, and snippets.

@jrjhealey
Last active September 20, 2017 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrjhealey/2144fa36a0c7504ee2ae691af36cf5a1 to your computer and use it in GitHub Desktop.
Save jrjhealey/2144fa36a0c7504ee2ae691af36cf5a1 to your computer and use it in GitHub Desktop.
Get wireless and ethernet MAC addresses.
#!/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