sort

sort -u

sort | uniq

#排序且删除重复行

sort | uniq -c

#计数唯一的,排序后的记录

sort | uniq -d

仅显示重复的记录

sort | uniq -u

仅显示未重复记录

sort -t: -k1,1 /etc/passwd

用户名排序,以:分割

sort -t: -k3nr /etc/passwd

UID反向排序,

原文地址:https://www.cnblogs.com/flyr/p/5487847.html