Bookmarklets Home | Links | Forms | Text and Data | Zap | Web Development | Validation | Misc

My log parser

This is a lame log parser written in DOS/Windows batch format.

REM Make sure we're using cygwin's case-sensitive sort, not Windows's case-insensitive sort.

REM Merge however many days of logs into one file.
cat acc* >all.txt

REM Create refer.txt.  (This all goes on one line.)
cut -d" " -f11 all.txt
 | grep -v "http:\/\/www\" | grep -v "http:\/\/"
 | sort | uniq -c
 | sort >refer.txt

End of sample output (tail --lines=5 refer.txt)

      5	""
      5	""
      6	""
     15	""
    502	"-"
Then I use linkify to make the URLs clickable and colored according to whether I've visited them, and I use query as link text to make search referers easier to read. I open links from the logs in new tabs so I don't have to use those bookmarklets again after clicking Back. Then I use find links to squarefree on each referring page to the anchor text and context of the link. (You can customize the last bookmarklet to find links to your site at the Log Analysis Bookmarklets page.)

© 2000-2007 Jesse Ruderman ( Feedback is welcome.
Last modified April 28, 2003.