[100352] in RedHat Linux List

home help back first fref pref prev next nref lref last post

awk help ? (I think)

daemon@ATHENA.MIT.EDU (Mike A. Lewis, CNE)
Fri Nov 20 04:03:42 1998

From: "Mike A. Lewis, CNE" <cajun@cajuninc.com>
To: "'redhat-list@redhat.com'" <redhat-list@redhat.com>
Date: Fri, 20 Nov 1998 01:02:55 -0800
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com


I'm wanting to filter my maillog files to do some troubleshooting.  I
believe that the job can be done with awk, but I'm not familiar with it
enough to even make a stab at it.  Perhaps there is a better way.

Consider the following lines:

Nov 20 00:44:44 mail-rly sendmail[10327]: AAA10327: from=root, size0,
class=0, pri0130, nrcpts=1, msgid=<199811200844.AAA10327@mail-rly.dprinc.com
<mailto:199811200844.AAA10327@mail-rly.dprinc.com> >, relay=root@localhost
<mailto:relay=root@localhost> 
Nov 20 00:45:16 mail-rly sendmail[10380]: AAA10327: to=cajun@cajuninc.com
<mailto:to=cajun@cajuninc.com> , ctladdr=root (0/0), delay:01:04,
xdelay:00:32, mailer=esmtp, relay=alligator.cajuninc.com. [204.33.59.15],
stat=Sent (OK)


Keep in mind, there are really only two lines in the above example.  What
I'd like to do is filter the lines such that I would end up with something
like this:

Nov 20 00:44:44 from=root, size0, relay=root@localhost
<mailto:relay=root@localhost> 
Nov 20 00:45:16 to=cajun@cajuninc.com <mailto:to=cajun@cajuninc.com> ,
delay:01:04, xdelay:00:32, relay=alligator.cajuninc.com. [204.33.59.15],
stat=Sent (OK)

Is this possible ?  Can someone get me pointed in the right direction ?

TIA,
Mike


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post