Dimitry Grigoryev <[EMAIL PROTECTED]> wrote: > Hi! > When I tried to sort my file using numeric and alphabetic keys at the same > time, it worked for sorting numeric first and alphabetic second. > > sort -k 3n -k 4 file > > But I could not make it work other way around. > > sort -k 2 -k 3n file > > What's doing on?
You should be using options like this: sort -k 3,3n -k 4,4 file sort -k 2,2 -k 3,3n file With `-k2' you're sorting on everything from the 2nd field to end of line. With `-k2,2' you're sorting only on the 2nd field. _______________________________________________ Bug-textutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-textutils