linux:sort
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:sort [2013/10/12 22:20] – created percy | linux:sort [2016/05/05 13:07] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== uniq -c ====== | ====== uniq -c ====== | ||
+ | -k1nr means sort by the column 1 and descending | ||
+ | -k2 means if k1 is the same value,then sort with column 2 by alphabetic | ||
cat PHONEMODEL-7.txt |sort|uniq -c|sort -k1nr -k2 | cat PHONEMODEL-7.txt |sort|uniq -c|sort -k1nr -k2 |
/var/www/dokuwiki/wiki/data/pages/linux/sort.txt · Last modified: 2016/05/05 13:07 by 127.0.0.1