- So IMO, chances are you always want
sort -u
withLC_ALL=C
, if you want unique lines. And if you want that resulting list to be sorted in the user's sort order, pipe it to sort again:
LC_ALL=C sort -u | sort
LC_ALL=C sort | LC_ALL=C uniq -c | sort -k2
网友评论