Created
April 5, 2019 13:30
-
-
Save Memphizzz/e4afbe717ee48c0806ad69b4533dacea to your computer and use it in GitHub Desktop.
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
while read event target lost ; do | |
case $event in | |
NEW ) | |
ip2int $target intTarget | |
((count[intTarget]++)) | |
... | |
esac | |
done < <(tail -f /path/logfile | sed -une ' | |
s/^.*New incom.*from ip \([0-9.]\+\) .*$/NEW \1/p; | |
s/^.*Auth.*ip \([0-9.]\+\) failed./FAIL \1/p; | |
... | |
') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How about something like