Grepping for 2 lines that begin the same

From: Alistair McKeown (Alistair.McKeown@jacobsrimell.com)
Date: Fri Nov 17 2006 - 09:42:36 EST


Hi there,

I know this isn't completely relativate, but im sure there someone out
there who could help. I'm going through an ldif file at the moment, and
I need to find places where a line starts the same, for example I need
to find how many times "jrTNs" is mentioned in two lines that follow
each other:

Part of a DN, there is 50,000!

jrMake: SA
jrModel: EPX2203
jrMTAProfileName: SA-EPX2203
jrPublicKey:
MIGJAoGBALZlv1EokO099wvnRQjvGmXG2I84HzGlDdRBLkIYRy0WTPY3VadtaX0AwEiii0Yc
yRbmIj4H/vZiwRqk0nyfYDY+uTMAcVbr8pzaZnMG+2NWdvB
NKDKxCC0olhhgSuJ0RlrUNJGyI/mJZbxZgzbH1uBgzELDRsnLLl4CKVV4J0qlAgMBAAE=
jrNoOfPorts: 2
jrNoOfPortsUsed: 1
jrTNs: 17895347
jrCMSID: ASAP-Hungary
nsUniqueId: 299738c7-dcce11da-80000000-00000000

I need to find DNs which have two jrTNs, like this :-

jrMake: SA
jrModel: EPX2203
jrMTAProfileName: SA-EPX2203
jrPublicKey:
MIGJAoGBALZlv1EokO099wvnRQjvGmXG2I84HzGlDdRBLkIYRy0WTPY3VadtaX0AwEiii0Yc
yRbmIj4H/vZiwRqk0nyfYDY+uTMAcVbr8pzaZnMG+2NWdvB
NKDKxCC0olhhgSuJ0RlrUNJGyI/mJZbxZgzbH1uBgzELDRsnLLl4CKVV4J0qlAgMBAAE=
jrNoOfPorts: 2
jrNoOfPortsUsed: 1
jrTNs: 17895347
jrTNs: 98734343
jrCMSID: ASAP-Hungary
nsUniqueId: 299738c7-dcce11da-80000000-00000000

Any help a appreciated, im sure it must be a grep.

Regards,

Alistair.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:41:12 EDT