Hello Tech Guys,
I have two files named check.txt and output.txt
Content of check.txt
620070527336551 40201800027285
620070551928314 40201800027285
620070534376312 40201800027285
620070536668046 02711306140261
620070248491123 02711306140261
620070553851296 02711306140261
620070446225438 02711306140261
620070544871702 02711306140261
Content of output.txt
# extended LDIF
#
# LDAPv3
# base <data=40201800027285
# filter: (objectclass=*)
# requesting: ALL
#
# 40201800027285
dn: data=40201800027285
data: 40201800027285
objectClass: device2g3g
locked: 000000000000000
locked: 620070527336551
locked: 620070000095731
locked: 620070534376312
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
# extended LDIF
#
# LDAPv3
# base <data=02711306140261
# filter: (objectclass=*)
# requesting: ALL
#
# 02711306140261
dn: data=02711306140261
data: 02711306140261
objectClass: device2g3g
locked: 620070263383027
locked: 620070551073690
locked: 620070446225438
locked: 620070555544259
locked: 620070453835231
locked: 620070248491123
locked: 620070556469603
locked: 620070536668046
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
The output.txt contains the search of two numeric data numbers i.e. 40201800027285 and 02711306140261 (could be more than two). Against each of these two numeric values the system provided the total number of locked items (could be more). Now I need to compare these locked items alongwith the items present in search.txt in 1st coloum and need to know the difference. The desired output after comparing these two files will be saved in difference.txt and should be like below:
data: 40201800027285
locked: 620070527336551 620070534376312
unlocked: 620070551928314
data: 02711306140261
locked: 620070536668046 620070248491123 620070446225438
unlocked: 620070553851296 620070544871702
Kindly suggest a code for the above described requirement. Efforts will be really appreciable.
Thanks.