Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Syslog files revisited

by johngg (Abbot)
on Aug 02, 2012 at 22:38 UTC ( #985108=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    knoppix@Microknoppix:~$ perl -Mstrict -Mwarnings -E '
    > my $line = q{May  2 04:06:15 lon-pop.mail.mydom.com pop3login: LOGOU
    +T, user=gonenow, ip=[::ffff:127.0.0.1], top=0, retr=0, rcvd=24, sent=
    +5560, time=1};
    ...
    > say $csv;'
    02/05/2012 04:06:15,lon-pop.mail.mydom.com,pop3login,LOGOUT, user=gone
    +now, ip=[::ffff:127.0.0.1], top=0, retr=0, rcvd=24, sent=5560, time=1
    knoppix@Microknoppix:~$ 
    
  2. or download this
    knoppix@Microknoppix:~$ perl -Mstrict -Mwarnings -E '
    > my $line = q{May  2 04:06:15 lon-pop.mail.mydom.com pop3login: LOGOU
    +T,  user=gonenow, ip=[::ffff:127.0.0.1], top=0, retr=0, rcvd=24, sent
    +=5560, time=1};
    ...
    > say $csv;'
    02/05/2012 04:06:15,lon-pop.mail.mydom.com,pop3login,"LOGOUT, user=gon
    +enow, ip=[::ffff:127.0.0.1], top=0, retr=0, rcvd=24, sent=5560, time=
    +1",gonenow,::ffff:127.0.0.1
    knoppix@Microknoppix:~$ 
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985108]
help
Chatterbox?
[Tux]: ELISHIVA, erix, Discipulus, afoken DBD::CSV now pushed. Try wget https://github. com/perl5-dbi/DBD- CSV/archive/ a26beac1.tar.gz -O DBD-CSV-0.50_01- a26beac1.tgz

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2017-05-29 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?