in reply to Duplicate fields

How do you determine that the two lines are duplicates?

Most likely you will want to look substr.