Created
November 9, 2022 12:04
-
-
Save dasgoll/306c6b9a617a5a142874b7023e46cc82 to your computer and use it in GitHub Desktop.
egrep ip address from log using regex
This file contains 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
egrep 'from ([0-9]{,3}.[0-9]{,3}.[0-9]{,3}.[0-9]{,3})' /var/log/secure -o |sed 's/from //g' | sort | uniq | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment