r11548: adding simple script to tail syslog and write to eventlog tdb
[ira/wip.git] / examples / scripts / eventlog / parselog.pl
1 while(<>) {
2     chomp();
3     @le = split '\s+',$_,5;
4     $ln = $le[4];
5     $cname = $le[3]; 
6     $outstr = sprintf "TMG: %d\nTMW: %d\nEID: 1000\nETP: INFO\nECT: 0\nRS2: 0\nCRN: 0\nUSL: 0\nSRC: Syslog\nSRN: $cname\nSTR: $ln\nDAT:\n\n",time(),time();
7     print $outstr;
8 }