Taking out data from a file.
- From: "Alistair McKeown" <Alistair.McKeown@xxxxxxxxxxxxxxxx>
- Date: Tue, 21 Nov 2006 10:35:25 -0000
Hi there,
I sent last week an email regarding trying to get out specific
lines from a large ldif file, many thanks to all that replied but, when
trying a combination of grep, sed and awk I still can't get the desired
result. What I have is a large LDIF file which has blocks DNs of cable
modems, separated by a blank line, for example here is two of them
dn:
jrDeviceUID=m00:e0:6f:58:e5:3e,ou=cm,ou=infrastructure,ou=budapest,ou=do
mains,ou=hu,ou=domains,o=chello
objectClass: top
objectClass: jrTop
objectClass: jrGenericDevice
jrDeviceUID: m00:e0:6f:58:e5:3e
jrBomObjectType: CM
jrDomObjectType: CM
jrMACAddress: 00:e0:6f:58:e5:3e
jrCOS: class_cm_chclassic
jrIPAddrReserved: FALSE
jrDeviceType: docsiscm
jrMake: docsiscm
jrModel: docsiscm
jrTemplateName: DOCSIS
jrSubID: m200195160
jrSubID: m200393132
jrCurrentState: {Classic}P
nsUniqueId: 0c62702e-dcce11da-80000000-00000000
dn:
jrDeviceUID=m00:e0:6f:58:e5:3d,ou=cm,ou=infrastructure,ou=budapest,ou=do
mains,ou=hu,ou=domains,o=chello
objectClass: top
objectClass: jrTop
objectClass: jrGenericDevice
jrDeviceUID: m00:e0:6f:58:e5:3d
jrBomObjectType: CM
jrDomObjectType: CM
jrMACAddress: 00:e0:6f:58:e5:3d
jrCOS: class_cm_chclassic
jrIPAddrReserved: FALSE
jrDeviceType: docsiscm
jrMake: docsiscm
jrModel: docsiscm
jrTemplateName: DOCSIS
jrSubID: m200195160
jrCurrentState: {Classic}P
nsUniqueId: 0c62702e-dcce11da-80000000-00000000
What I need to do is be able to output to another file the whole DN's
which contain two "jrSubID"s and not to output DN's that contain only
one "jrSubID"
Any offers?
Kind regards,
Alistair.
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Prev by Date: SCSI Question
- Next by Date: [Fwd: Re: spurious messages]
- Previous by thread: SCSI Question
- Next by thread: [Fwd: Re: spurious messages]
- Index(es):
Relevant Pages
|
|