awk + How do I find duplicates in a column?

后端 未结 3 1270
孤街浪徒
孤街浪徒 2021-02-09 09:27

How do I find duplicates in a column?

$ head countries_lat_long_int_code3.csv | cat -n
     1  country,latitude,longitude,name,code
     2  AD,42.546245,1.601554         


        
3条回答
  •  孤独总比滥情好
    2021-02-09 09:56

    If you just want to print out a unique value that repeat over the same file just add at the end of the awk:

    awk ... ... | sort | uniq -u

    That will print the unique values only on alphabetic order

提交回复
热议问题