Okay so I want remove duplicate lines but it's a bit more complicated than that..
I have a file named users.txt, example of file is:
users:email@email.com
users1:email@email.com
Now due to a bug in my system people were able to register with the same email as someone else, so I want to remove if lines have the same email more than once, example of issue:
user:display:email@email.com
user2:email@email.com
user3:email@email.com
user4:email@email.com
Notice how user, user2, user3, user4 all have the same email.. well I want to remove user2, user3, user4 but keep user.. or vice versa ( first one to be picked up by request ) remove any other lines containing same email..
so if
email@email.com is in 20 lines remove 19
spam@spam.com is in 555 lines remove 554
and so fourth..