OpenSolaris

Printable Version Enter a New Search
Bug ID 6240542
Synopsis sort order incorrect with multiple fields
State 10-Fix Delivered (Fix available in build)
Category:Subcategory utility:sort
Keywords onnv_triage | rtiq_reviewed
Responsible Engineer Renaud Manus
Reported Against
Duplicate Of
Introduced In solaris_2.0
Commit to Fix snv_70
Fixed In snv_70
Release Fixed solaris_nevada(snv_70)
Related Bugs 6733941
Submit Date 15-March-2005
Last Update Date 8-August-2007
Description
The following is a file with several comma-separated fields. Sorting on
field 2 followed by field 1 produces an incorrect order.

$ cat foo
100,abc,foo
101,def,foo
200,abc,foo
201,def,
300,abc,foo
301,def,foo

$ sort -t,  -k2,2 -k1,1 foo
100,abc,foo
200,abc,foo
300,abc,foo
101,def,foo
301,def,foo
201,def,

 xxxxx@xxxxx.com 2005-03-15 01:00:37 GMT
Work Around
N/A
Comments
N/A