http://rachzhang.iteye.com/blog/774709 sort -n -k1 output.dat > sortedOutput.dat 选项n表示按数值排序, k1表示按第一列排序。