1. 程式人生 > >shell sort命令

shell sort命令

hello1 大小寫 local abcde rst uniq def 小寫 nbsp

選項與
-f:忽略大小寫的差異
-b:忽略最前面的空格部分
-M:以月份的名字來排序
-n:使用純數字進行排序
-r:反向排序
-u:就是uniq,相同的數據中,僅出現一行代表
-t:分隔符,預設是用tab鍵來分隔
-k:以那個區間filed來進行排序
[[email protected] ~]$ cat 1.txt | sort
abc
abcdefg hijklmn
hello
HEllo1
hello2
hello world
opqrst uvwxyz
world
world3
-r參數進行反向排序
[[email protected] ~]$ cat 1.txt | sort -r
world3
world

opqrst uvwxyz
hello world
hello2
HEllo1
hello
abcdefg hijklmn
abcsort

shell sort命令