I need some help with a script that reads a mail log file in , and outputs it to a file, which has the same info. in other words every field in the mail log line will be seperated by spaces, and these fields should be output should be surrounded by quotes,seperated by commas.
any help would be greatly appreciated.
N
Heres the input:
Feb 11 12:25:47 5of4 sendmail[39182]: h1BIPkS39158: to=<Daniel32hkys@cs.com>, dela
y=00:00:01, xdelay=00:00:00, mailer=relay, pri=34463, relay=smtp.advertisnet.com.
[216.176.166.217], dsn=2.0.0, stat=Sent (h1BIPlo27854 Message accepted for deliver
y)
Feb 11 12:25:47 5of4 sendmail[39165]: h1BIPkS39165: from=<nathanialqwyf@intelesis.
no>, size=1356, class=0, nrcpts=4, msgid=<000411a2dd07$bde76306$27710656@bfgwnsg.y
sh>, proto=ESMTP, daemon=MTA, relay=7of4.advertisnet.com [216.176.166.218]
Feb 11 12:25:47 5of4 sendmail[39186]: h1BIPkS39166: Received: from 7of4.advertisn
et.net (7of4.advertisnet.com [216.176.166.218]) by 5of4.advertisnet.com (8
.11.3/8.11.3) with ESMTP id h1BIPkS39166 for <gulfwar@dam.net>; Tue, 11 Feb
2003 12:25:46 -0600 (CST)
any help would be greatly appreciated.
N
Heres the input:
Feb 11 12:25:47 5of4 sendmail[39182]: h1BIPkS39158: to=<Daniel32hkys@cs.com>, dela
y=00:00:01, xdelay=00:00:00, mailer=relay, pri=34463, relay=smtp.advertisnet.com.
[216.176.166.217], dsn=2.0.0, stat=Sent (h1BIPlo27854 Message accepted for deliver
y)
Feb 11 12:25:47 5of4 sendmail[39165]: h1BIPkS39165: from=<nathanialqwyf@intelesis.
no>, size=1356, class=0, nrcpts=4, msgid=<000411a2dd07$bde76306$27710656@bfgwnsg.y
sh>, proto=ESMTP, daemon=MTA, relay=7of4.advertisnet.com [216.176.166.218]
Feb 11 12:25:47 5of4 sendmail[39186]: h1BIPkS39166: Received: from 7of4.advertisn
et.net (7of4.advertisnet.com [216.176.166.218]) by 5of4.advertisnet.com (8
.11.3/8.11.3) with ESMTP id h1BIPkS39166 for <gulfwar@dam.net>; Tue, 11 Feb
2003 12:25:46 -0600 (CST)