#342·xsv

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

Author: whlavinaCreated Apr 8, 2024Updated Dec 28, 2024

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.