Skip to content

Instantly share code, notes, and snippets.

@mabrizio
Created January 20, 2014 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mabrizio/8524617 to your computer and use it in GitHub Desktop.
Save mabrizio/8524617 to your computer and use it in GitHub Desktop.
Visitors per ip per day - Apache
#!/usr/bin/env tcsh
foreach i (`cat access.log | cut -d \] -f1 | cut -d \[ -f2 | cut -d \: -f1 | perl -ne 'print unless $seen{$_}++' `)
printf "$i -> "
printf `grep $i access.log | awk '{print $1}' | sort | uniq | wc -l`
echo " different IPs"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment