Created
August 13, 2018 21:44
-
-
Save aerostitch/1d10d29eb92d302c719b5dbb4e913dbd to your computer and use it in GitHub Desktop.
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
# reports the number of occurences of an IP in aws ELB access logs files | |
awk '{match($3, /(.*):.*/,arr);k=arr[1];if(k in counter){counter[k]++}else{counter[k]=1}} END {for(i in counter){printf "%d \t %s\n",counter[i],i}}' *.log | sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment