I am trying to insert line breaks on a file based on the same names which happens to be the second field in my file. So, my input file is like below.
17412193|name1|organization 43979400|name1|organization 1405541|name2|organization 53595498|name2|organization 50439202|name2|organization 54678379|name3|Not Found 21757330|name3|organization
So I am trying to get the output like,
17412193|name1|organization 43979400|name1|organization ###linebreak inserted here 1405541|name2|organization 53595498|name2|organization 50439202|name2|organization ###linebreak inserted here 54678379|name3|Not Found 21757330|name3|organization ###linebreak inserted here
I am using this line break to split the input file to group the similar names together. I would later apply a similarity algorithm on these grouped names. So, for the above example, after the output I would apply the similarity algorithm on 3 pairs of names.