>>> 此贴的回复 >> sort -t, +1 file [root@RHEL3 root]# cat temp.txt a,105 g,410 a,500 g,220 a,600 o,3l5 o,760 [root@RHEL3 root]# cat temp.txt |sort -t, +1 a,105 g,220 o,3l5 g,410 a,500 a,600 o,760