On Tue, 31 Mar 2020, Paul Heinlein wrote:
On Tue, 31 Mar 2020, [email protected] wrote:
Everyone has different toolbox and regexp logic wired in their brains.
I prefer to break things down somewhat step by step - and think ahead -
mostly
it is worth it.
I'm just the opposite; use the simple tool: -V option to GNU sort.
OK, that was too snarky to be helpful.
Rich,
GNU sort has a couple different options for this sort of thing. The -n
option does a basic numeric sort. It works fine on a list of basic
numbers.
The -V option is newer and was designed to sort the more complex
numeric strings in product versions. E.g., 1.0.8 should sort before
1.0.10. In fact, however, -V is very smart and will handle lots of
compound numeric strings like M/D/Y strings that aren't zero-padded
(1/8/2020 sorts before 1/10/2020).
--
Paul Heinlein
[email protected]
45°38' N, 122°6' W
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug