文本行去重并按重复次数排序

2016-09-09  本文已影响23人  darebeat

默认是按升序排列,如果想要按降序要加-r选项(sort -rn)

sort test.txt | uniq -c
sort test.txt | uniq -c | sort -rn | cut -c 9-  
上一篇 下一篇

猜你喜欢

热点阅读