[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: version sort suggestion
From: |
arnold |
Subject: |
Re: version sort suggestion |
Date: |
Fri, 04 Feb 2022 01:37:36 -0700 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
Ed Morton <mortoneccc@comcast.net> wrote:
> I often see people posting question on forums such as StackOverflow
> asking about sorting data by version numbers, e.g.
> https://stackoverflow.com/q/70972516/1745001. Currently I always
> recommend people use GNU sort for it's `-V` option to sort by version
> outside of awk before/after/during processing but it'd be useful if
> sorting by version was one of the options for "sorted_in", e.g.
> @ind_ver_asc, @val_ver_asc, etc. so people don't have to code that
> functionality themselves or rely on calling GNU sort for it.
>
> Ed.
Thanks for the suggestion. I don't see a reason to do this when it
can be coded if needed and a function name passed to asort or asorti.
If you wish to contribute a "version_compare" function for the manual
that could then be included in the documentation, that would be
helpful.
Arnold