|
2010-09-17
| ||
| 23:10 | • Closed ticket [3069114fff]: lsort man page: add hint for sorting of equal record... artifact: 06ee9bdf3b user: dgp | |
| 15:38 | • New ticket [3069114fff]. artifact: 5cbfdc8639 user: oehhar | |
lsort man page: add hint for sorting of equal records
Closed / Invalid3069114fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 16 years ago
Descriptionplain2010-09-17 15:38:06
lsort in 8.5.9 leaves equal records unsorted:
% lsort -index 0 {{1 2} {1 0}}
{1 2} {1 0}
If this is always like that and is intended, this could be stated in the man page.
An example could be added with multiple sort indexes:
% lsort -index 0 -dictionary [lsort -index 1 -real {{Apples 3.2} {Plums 4.0} {Apples 1.0}}]
{Apples 1.0} {Apples 3.2} {Plums 4.0}
dgpplain2010-09-17 23:10:50
allow_comments - 1
The docs already note this:
"The implementation of the lsort command uses the merge-sort
algorithm which is a stable sort that has O(n log n) performance char-
acteristics."
Log in (anonymous is fine) to add a comment.