我有2列,我想用bash对它们进行排序.
我使用了命令:
sort -k2 -n
c 9
c 11
c 11
sh 11
c 13
c 15
txt 47
txt 94
txt 345
txt 628
sh 3673
Run Code Online (Sandbox Code Playgroud)
这是结果,但我需要它们像这样排序:
c 9
c 11
c 11
c 13
c 15
sh 11
sh 3673
txt 47
txt 94
txt 345
txt 628
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?