【问题标题】:How to sort and count occurrence of lines in linux [duplicate]如何在linux中对行的出现进行排序和计数[重复] 【发布时间】:2018-12-06 11:10:26 【问题描述】: 如何统计linux中list的出现结果? a b b c c d Result: a = 1 , b = 2 , c=2 , d=1 【问题讨论】: 标签: linux bash terminal 【解决方案1】: 我通过piping这个命令解决了这个问题 sort | uniq -c 【讨论】: