Skip to content

Instantly share code, notes, and snippets.

@mbildner
Last active August 29, 2015 14:22
Show Gist options
  • Save mbildner/e5af0ec1ec2f863b930e to your computer and use it in GitHub Desktop.
Save mbildner/e5af0ec1ec2f863b930e to your computer and use it in GitHub Desktop.
regex to find broadcast ip address
/inet\s{1}(?!127\.0\.0\.1)(.*?)\s/
ifconfig | grep 'inet\s' | grep -v 127 | cut -d' ' -f 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment