Friday, September 13, 2019

Sort content of file and remove duplicates

I had to sort contents of a list and remove duplicates..

> cat list.txt | sort -u list-sorted-unique.txt

And then I found that the first column still has duplicates

> cut -d ':' -f1 list-sorted-unique.txt | sort -u | wc -l

No comments:

Post a Comment