My requirement goes this way.I would like to remove duplicates from a file.Below is an example of input file.
Input file:-
00001234 TEST1 TESTING
00001234 DESCRIPTION
00003456 TEST2 TESTER2
00003456 DESC
00001234 TEST1 TESTER1
00001234 EXAMPLE1
00003456 TEST2 TESTER2
00003456 EXAMPLE2
00001234 TEST1 TESTSAMP
00001234 SAMPLE1
00001234 DESCRIPTION
00003456 TEST2 TESTER2
00003456 DESC
00001234 TEST1 TESTER1
00001234 EXAMPLE1
00003456 TEST2 TESTER2
00003456 EXAMPLE2
00001234 TEST1 TESTSAMP
00001234 SAMPLE1
The first 8 positions were the key fields and the positions from 13 till 17 are the descriptive fields.Now that i would like to remove the other occurence's of the field such that if it encounters the same key's feilds and same descriptive fields again.
The output file should contain following records, eliminating the other duplicate occurrence's of the keyfield+ descriptive field.
Output file:-
00001234 TEST1 TESTING
00001234 DESCRIPTION
00003456 TEST2 TESTER2
00003456 DESC
00001234 DESCRIPTION
00003456 TEST2 TESTER2
00003456 DESC
I would like to remove the other occurrence's of the fields.