Skip to content

Instantly share code, notes, and snippets.

@willm
Created May 8, 2020 04:32
Show Gist options
  • Save willm/eb3eb2765b87316d51a27662d3bd4761 to your computer and use it in GitHub Desktop.
Save willm/eb3eb2765b87316d51a27662d3bd4761 to your computer and use it in GitHub Desktop.
parse just the ip addresses from ifconfig
ifconfig | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment