Created
July 8, 2016 19:32
-
-
Save tristandostaler/8bf1c42ec2d8d071d145509e4f479848 to your computer and use it in GitHub Desktop.
script to count the number of occurence of an IP in the logs (used with a router)
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
#/bin/sh | |
sudo grep "SRC=" /var/log/kern.log |awk '{print $10}' | sort | uniq -c |sort -n |sed 's/SRC=//g' | sed 's/DST//g' | sed 's/DS//g' | sed 's/D//g' $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment