My file is like this:
alice, bob bob, cat cat, dennis cat, bob dennis, alice
I want to remove lines where same words have been repeated in reverse order. In this example,
bob, cat and
cat, bob are repeated, so cat bob should be removed and my output should be
alice, bob bob, cat cat, dennis dennis, alice
How can I do this?