Last active
June 1, 2016 19:03
-
-
Save dmgig/60ecbba8b2a47a9cfeceff1525879d4e to your computer and use it in GitHub Desktop.
grep regex for ip addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
tail -n 1000 /var/log/my.log | 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