BurntSushi / xsv

A fast CSV command line toolkit written in Rust.
The Unlicense
10.35k stars 321 forks source link

sort by mixed column types, some numeric and some non-numeric, some forward and some reverse #342

Open whlavina opened 6 months ago

whlavina commented 6 months ago

The sort command can sort lexicographically or numerically, optionally in reverse order, but this applies to all columns. It is not possible to sort by a compound key that mixes some columns of each type, some columns reversed.

A workaround is to use GNU sort, which does have this feature, but unlike xsv tooling, it doesn't handle CSV format or column headers.