This is a followup to this question : What does sort -n do with non numeric values?
Here is my input:
1-----***
R----****
1---*****
And I run:
sort -k 1.2,1.9n input.txt > output.txt
Here is my output:
1-----***
1---*****
R----****
And my expected output:
1---*****
R----****
1-----***
I expect this output since the ASCII value of * (42) is smaller than the value of - (45). However, it appears the R is being considered in the sort, but I thought 1.2,1.9 would exclude it. What am I doing wrong?