Here is the file I am working with
word01.2 10 25
word01.2 30 50
word01.1 10 30
word01.1 40 50
word01.2 40 50
word01.1 10 20
word01.1 5 8
When I try my sort command
sort -k1,1 -k2,2 -k3,3 file.txt
I receive the following; I don't understand why line 2 and line 1 are not sorted, they should be in reverse positions
word01.1 10 30
word01.1 10 20
word01.1 40 50
word01.1 5 8
word01.2 10 25
word01.2 30 50
word01.2 40 50
When I try to add -g to the sort, the sorted file has more problems and column 1 is no longer sorted
sort -k1,1 -gk2,2 -gk3,3 file.txt
word01.1 5 8
word01.1 10 20
word01.2 10 25
word01.1 10 30
word01.2 30 50
word01.1 40 50
word01.2 40 50
What I would like as results is
word01.1 5 8
word01.1 10 20
word01.1 10 30
word01.1 40 50
word01.2 10 25
word01.2 30 50
word01.2 40 50