6096 comments
2357 subscribers
6254 on Twitter
Subscribe! Feed reader E-mail

My ref-filter script

#/usr/bin/perl

my $s;
while ($s = <>)
  {
    if ($s =~ /.+?\"GET ([^ ]+) .+?".+?"([^"]+)/)
      {
        my $REF = $2;
        my $PAGE = $1;
        if ($REF ne "-"
            && $REF !~ /sacha.free.net.ph/
            && $REF !~ /richip.dhs.org/
           && $REF !~ '\+') {
          print "$REF\n";
        }
      }
  }

Invocation:

cat log | perl ref.pl | sort | uniq > reff

For greater fun and profit, diff against previous records.

../../sitelogs/ref.pl

Short URL: http://sachachua.com/blog/p/2361

On This Day...

Get the highlights as a PDF!

Stories from my Twenties: Highlights from a Decade of Blogging

Free sample!