/[nn]/stat/calc.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /stat/calc.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Mar 7 12:18:51 2002 UTC (22 years, 2 months ago) by dpavlin
Branch: MAIN
File MIME type: text/plain
some scripts for web access stats

1 dpavlin 1.1 #!/usr/bin/perl -w
2    
3     my %count;
4    
5     while(<>) {
6     chomp;
7     if (m,\[(\d+/\w+/\d{4}:)(\d\d):(\d\d:)\d\d\s+\S+\]\s+"(\w+)\s+,) {
8     my ($date,$hh,$mm,$method) = ($1,$2,$3,$4);
9     $count{"$date$hh"}++;
10     } else {
11     print STDERR "line '$_' skipped!\n";
12     }
13     }
14    
15     foreach (keys %count) {
16     print "$_\t$count{$_}\n";
17     }

  ViewVC Help
Powered by ViewVC 1.1.26