Skip to content

Instantly share code, notes, and snippets.

@smeghead
Created June 25, 2011 19:07
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 smeghead/1046788 to your computer and use it in GitHub Desktop.
Save smeghead/1046788 to your computer and use it in GitHub Desktop.
referer samary
#!/usr/bin/awk -f
BEGIN {
}
{
if ($11 != "\"-\"") {
if (urls[$11] == "") {
urls[$11] = 0;
}
urls[$11] += 1;
}
}
END {
for( key in urls) {
print urls[key] " " key;
}
}
#!/bin/sh
cat logs/access* | awk -f ranking.awk | sort -r -g -k 1 | head -10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment