1、
root@DESKTOP-1N42TVH:/home/test# ls test.txt root@DESKTOP-1N42TVH:/home/test# cat test.txt chr1 snp1 0 55910 chr1 snp2 0 85204 chr1 snp3 0 122948 chr1 snp4 0 203750 chr2 snp5 0 167127 chr2 snp6 0 176079 chr2 snp7 0 361433 chr2 snp8 0 551593 chr3 snp9 0 144010 chr3 snp10 0 199910 chr3 snp11 0 234281 chr3 snp12 0 274686 root@DESKTOP-1N42TVH:/home/test# sort -uk1,1 -V test.txt ## 按照第一列进行去重复 chr1 snp1 0 55910 chr2 snp5 0 167127 chr3 snp9 0 144010