全部博文(279)
分类:
2008-01-22 16:18:14
#!/usr/bin/perl
use strict;
use HTTPD::Log::Filter;
my $filter = HTTPD::Log::Filter->;new(format =>; "CLF",
capture =>; ['request', 'host']);
foreach(`cat access_log`)
{
chomp;
unless( $filter->;filter($_) )
{
print "[$_]\n";
next;
}
print $filter->;request, "\n";
}
exit 0;
use HTTPD::Log::Filter;
print HTTPD::Log::Filter->;new(format=>;"CLF",capture=>;['request'])->;re;