I have a file having the following lines
Code:
7 1 10
7 1 12
7 1 14
7 1 16
7 1 2
7 1 4
7 1 6
7 1 8
7 2 10
7 2 11
9 2 9
7 2 13
7 2 15
7 2 17
7 2 1
7 2 2
7 2 3
7 2 4
7 2 5
7 2 6
7 2 7
7 2 8
8 2 9
I want to get it sorted by column1,column,column3
I have used
sort -nk1,3 <filename>
but i get the output as
Code:
7 1 10
7 1 12
7 1 14
7 1 16
7 1 2
7 1 4
7 1 6
7 1 8
7 2 1
7 2 10
7 2 11
7 2 13
7 2 15
7 2 17
7 2 2
7 2 3
7 2 4
7 2 5
7 2 6
7 2 7
7 2 8
8 2 9
9 2 9