Hi.
I have a tab separated file that has a couple nearly identical lines. When doing:
sort file | uniq > file.new
It passes through the nearly identical lines because, well, they still are unique.
a)
I want to look only at field x for uniqueness and if the content in field x is the same as field x in any other line, move all the duplicate lines to a new file called file.duplicates.
b)
I also want to be able to look only at field x for uniqueness and if the content in field x is the same as field x in any other line, remove the following lines with the duplicate field x.
Thanks in advance!