I have a very large data (12G) that looks like this:
foo r1.1 abc
foo r10.1 pqr
qux r2.1 lmn
bar r33.1 xpq
What I want to do is to sort 2nd field numerically yielding (in reality there are more leading fields):
foo r1.1 abc
qux r2.1 lmn
foo r10.1 pqr
bar r33.1 xpq
I tried the following but won’t work:
sort -k1 -n
What’s the right way to do it?
How about
sort -k1.2nif it starts with just an r