Sendmail

From Federal Burro of Information
Revision as of 14:46, 25 June 2012 by David (talk | contribs) (Created page with "== Logchop == <pre> while (<>) { chomp; if ( /(\w{3})\s(\d{2})\s(\d{2}:\d{2}:\d{2})\s(\w+)\s(\w+)\[\d+\]/ ) { $month = $1; $d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Logchop


while (<>) {
        chomp;
        if ( /(\w{3})\s(\d{2})\s(\d{2}:\d{2}:\d{2})\s(\w+)\s(\w+)\[\d+\]/ ) {
                $month = $1;
                $date = $2;
                $time = $3;
                $host = $4;
                $process = $5;
                print "Match $_\n";
                print "mont: $1\
        } else {
                print "No: ".$_."\n";
        }
}