I hope someone is reading these.
I am trying to sort a simple file into order of alphamerically by the
first field and numerically by the second field witin. The fields are
separated by a space.
Here is a snippet of my data:
And as you can see the 2nd field appears to be random within the first.
I've tried numerous tricks with sort such as:
-g to get numeric sorting (but that didn't work because it expects the
number to be in characters 1+
-n to force a numeric sort but again that worked like the -g
-k 1.1,2.1 to define the 1st field as the first key starting in pos 1
and the second field as the 2nd key starting in its relative position 1.
Both didn't work and gave me much the same output as above. Then I
added the letter n to the end of the 2nd field "-k 1.1,2.1n" and this
didn't work at all.
I've ready tons of material on this today and tried virtually everything
I found. Can any of you luggers come up with some sound ideas?
Thanks all. Bob