On 05/03/2020 15:14, Peng Yu wrote:
I have a TSV file with a column in hex format, e.g., 0x1a000, 0x17000, 0xe000.

Is there a way to sort the rows by this column in hex? Thanks.

-g supports hex, though has overhead in float conversion.
For example `sort -k2,2g` would sort on the second key if hex.
Note if the numbers are fixed width, or can be prepended with 0 to a fixed 
width,
then you can use simple textual comparison to do the sort.

cheers,
Pádraig


Reply via email to