User Tools

Site Tools


kurs:loganalyze.pl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:loganalyze.pl [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​
 +#2005-03-13 04:52:08 1DAK9A-00036h-Du <= Kelly@australia.edu H=(67.19.219.66) [67.19.219.66] P=esmtp S=3260 id=N8vdA-68822V-5I@gee-wiz.com
  
 +open (FH, "< main.log"​);​
 +
 +@zeilen = <FH>;
 +
 +foreach $zeile (@zeilen) {
 +  if ($zeile =~ /<​=\s(.*?​)\sH/​) {
 +    $hash{$1}++;​
 +  }
 +}
 +
 +
 +##  map (/<​=\s(.*?​)\sH/;​ $hash{$1}++) @zeilen;
 +   
 +
 +@keys = sort {
 +  $hash{$a} <=> $hash{$b}
 + } keys %hash; ​      # sort by value
 +
 +
 +foreach $key (@keys)
 +{
 +  printf("​%-50s:​ %d \n", $key, $hash{$key} );  ​
 +  #print "​$key"​.":​ ";
 +  #print "​$hash{$key}\n";​
 +}
 +</​code>​
kurs/loganalyze.pl.txt ยท Last modified: 2014/09/10 21:22 (external edit)