I have a text file which is of the form -
b SN:2 d SN:5 f SN:10 g SN:11 h SN:15 i SA:3 j SN:1 k SN:4
And I want to sort by the second column, actually the numerical value in the second column. I've tried -
$ sort -n -k2,2 file $ sort -k2.4,2.5n file
but nothing seems to work.