Skip to content

Instantly share code, notes, and snippets.

@ryanmoon
Created April 28, 2015 21:38
Show Gist options
  • Save ryanmoon/b85f40e19398f14a9681 to your computer and use it in GitHub Desktop.
Save ryanmoon/b85f40e19398f14a9681 to your computer and use it in GitHub Desktop.
Print Third Octet Of IP Address (OS X)
ipconfig getifaddr en0 | tr "." " " | awk '{print $3}'
@ryanmoon
Copy link
Author

Where en0 is the IP address you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment