rakesh.cp 0 Newbie Poster

FILE A


nsRoleDN: "cn=/BCE/AdminRole,dc=bce,dc=ca",dc=bce,dc=ca
uid: uid1
creatorsName: cn=directory manager
createTimestamp: 20050428180535Z
NetworkElement-allowedNETypeList: NAME1
NetworkElement-allowedNETypeList: NAME2
NetworkElement-allowedNETypeList: NAME3
NetworkElement-allowedNETypeList: NAME5
NetworkElement-allowedNETypeList: NAME6
NetworkElement-allowedNETypeList: NAME7
modifiersName: cn=puser,ou=dsame users,dc=bce,dc=ca
modifyTimestamp: 20090219190143Z

nsRoleDN: "cn=/BCE/DARTS,dc=bce,dc=ca",dc=bce,dc=ca
uid: uid2
creatorsName: cn=directory manager
createTimestamp: 20050428180535Z
NetworkElement-allowedNETypeList: NAME1
NetworkElement-allowedNETypeList: NAME2
NetworkElement-allowedNETypeList: NAME3
NetworkElement-allowedNETypeList: NAME5
NetworkElement-allowedNETypeList: NAME6
NetworkElement-allowedNETypeList: NAME7
NetworkElement-allowedNETypeList: NAME8
NetworkElement-allowedNETypeList: NAME9
NetworkElement-allowedNETypeList: NAME10
NetworkElement-allowedNETypeList: NAME11
NetworkElement-allowedNETypeList: NAME12
NetworkElement-allowedNETypeList: NAME13
NetworkElement-allowedNETypeList: NAME14
NetworkElement-allowedNETypeList: NAME15
modifiersName: cn=puser,ou=dsame users,dc=bce,dc=ca
modifyTimestamp: 20090219190143Z

nsRoleDN: "cn=/BCE/DARTS/OPERATORS,dc=bce,dc=ca"
uid: uid3
creatorsName: cn=directory manager
createTimestamp: 20050428180535Z
NetworkElement-allowedNETypeList: NAME1
NetworkElement-allowedNETypeList: NAME2
NetworkElement-allowedNETypeList: NAME3
NetworkElement-allowedNETypeList: NAME5
NetworkElement-allowedNETypeList: NAME6
NetworkElement-allowedNETypeList: NAME7
NetworkElement-allowedNETypeList: NAME8
NetworkElement-allowedNETypeList: NAME9
NetworkElement-allowedNETypeList: NAME10
NetworkElement-allowedNETypeList: NAME11
NetworkElement-allowedNETypeList: NAME12
NetworkElement-allowedNETypeList: NAME13
NetworkElement-allowedNETypeList: NAME14
NetworkElement-allowedNETypeList: NAME15
NetworkElement-allowedNETypeList: NAME16
modifiersName: cn=puser,ou=dsame users,dc=bce,dc=ca
modifyTimestamp: 20090219190143Z

FILE B
------

"cn=/BCE/AdminRole,dc=bce,dc=ca"
NetworkElement-allowedNETypeList: NAME1
NetworkElement-allowedNETypeList: NAME2
NetworkElement-allowedNETypeList: NAME3
NetworkElement-allowedNETypeList: NAME5
NetworkElement-allowedNETypeList: NAME6
NetworkElement-allowedNETypeList: NAME7
NetworkElement-allowedNETypeList: NAME8
NetworkElement-allowedNETypeList: NAME9
NetworkElement-allowedNETypeList: NAME10

"cn=/BCE/DARTS,dc=bce,dc=ca"
NetworkElement-allowedNETypeList: NAME1
NetworkElement-allowedNETypeList: NAME2
NetworkElement-allowedNETypeList: NAME3
NetworkElement-allowedNETypeList: NAME5
NetworkElement-allowedNETypeList: NAME6
NetworkElement-allowedNETypeList: NAME7
NetworkElement-allowedNETypeList: NAME8
NetworkElement-allowedNETypeList: NAME9
NetworkElement-allowedNETypeList: NAME10
NetworkElement-allowedNETypeList: NAME11
NetworkElement-allowedNETypeList: NAME12
NetworkElement-allowedNETypeList: NAME13
NetworkElement-allowedNETypeList: NAME14
NetworkElement-allowedNETypeList: NAME15

"cn=/BCE/DARTS/OPERATORS,dc=bce,dc=ca"
NetworkElement-allowedNETypeList: NAME1
NetworkElement-allowedNETypeList: NAME2
NetworkElement-allowedNETypeList: NAME3
NetworkElement-allowedNETypeList: NAME5
NetworkElement-allowedNETypeList: NAME6
NetworkElement-allowedNETypeList: NAME7
NetworkElement-allowedNETypeList: NAME8
NetworkElement-allowedNETypeList: NAME9
NetworkElement-allowedNETypeList: NAME10
NetworkElement-allowedNETypeList: NAME11
NetworkElement-allowedNETypeList: NAME12
NetworkElement-allowedNETypeList: NAME13
NetworkElement-allowedNETypeList: NAME14
NetworkElement-allowedNETypeList: NAME15
NetworkElement-allowedNETypeList: NAME16
NetworkElement-allowedNETypeList: NAME17
NetworkElement-allowedNETypeList: NAME18


I have two files (FILE A and FILE B) as above

I have to read the uid, nsRoleDN and NetworkElement-allowedNETypeList.from FILE A

I have to search the nsRoleDN ( eg cn=/BCE/DARTS/OPERATORS,dc=bce,dc=ca for uid3)

in the FILE B and NetworkElement-allowedNETypeList for that nsRoleDN ( eg cn=/BCE/DARTS/OPERATORS,dc=bce,dc=ca for uid3)

if the NetworkElement-allowedNETypeList list exactly matching with the file b then it will

display uid correctly configured otherwise incorrectly configured.

As per the above data the output should be as below

uid1 Not Configured

uid2 Configured

uid3 Not Configured

My question is how to group the uid its nsRoleDN and the NetworkElement-allowedNETypeList for that user together.

Search for the nsRoleDN and the NetworkElement-allowedNETypeList in the second file and find the match.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.