|
From: | Renaud Pacalet |
Subject: | [sort] Suggestion: count keys from the end of record |
Date: | Sun, 13 Aug 2023 16:40:39 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 |
Would it be possible to specify the sorting keys from the end of the record, instead of the beginning. Something like sort -k-1,-1 to sort on the last field of each record, sort -k-2,-2 for the second to last...
This would be handy when the format has a variable number of fields per record but the last records are well defined.
-- Renaud Pacalet Télécom Paris Campus SophiaTech 450 Route des Chappes, CS 50193 06904 Biot Sophia Antipolis cedex, FRANCE Tel : +33 (0) 4 9300 8402 Web : http://www.telecom-paris.fr/
[Prev in Thread] | Current Thread | [Next in Thread] |