Skip to content

Instantly share code, notes, and snippets.

@htkcodes
Created February 14, 2020 01:56
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 htkcodes/ec8fc5ff4465fd390a3e2550cbca63eb to your computer and use it in GitHub Desktop.
Save htkcodes/ec8fc5ff4465fd390a3e2550cbca63eb to your computer and use it in GitHub Desktop.
#Grabs ip's from text
grep -E -o '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)' <source> > <destination>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment