Taking out data from a file.



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



Relevant Pages

  • Re: adam:set the password for the users in the ldif file
    ... If you use userPassword, then all you need is a secure channel, SSL that is ... You can disable secure channel requirement for pwd operations. ... >> I have generated an ldif file to be imported to the ADAM ... >> objectClass: person ...
    (microsoft.public.windows.server.active_directory)
  • Re: ADAM Error: "A referral was returned..."
    ... changetype: add ... objectclass: organizationalUnit ... > find the naming context being referenced in the ldif file ...
    (microsoft.public.windows.server.active_directory)
  • Re: adam:set the password for the users in the ldif file
    ... You need to load it over a secure channel for ADAM users (unless you've ... > I have generated an ldif file to be imported to the ADAM ... > name: CAAAAA ... > objectClass: person ...
    (microsoft.public.windows.server.active_directory)
  • Re: Best way to extend a stuctural objectclass?
    ... You probably want to give more technical detail such as the aux class definition, whether you are using it statically or dynamically, and the ldif file for the user creation. ... would be better to add a stuctural objectclass or an auxiliary objectclass? ...
    (microsoft.public.windows.server.active_directory)