sublime-sort-numerically icon indicating copy to clipboard operation
sublime-sort-numerically copied to clipboard

version-sort?

Open gMan1990 opened this issue 6 years ago • 1 comments

like:

sort -V
     -V, --version-sort
             Sort version numbers.  The input lines are treated as file names in form PREFIX VERSION SUFFIX, where SUFFIX matches the regular expression "(.([A-Za-z~][A-Za-
             z0-9~]*)?)*".  The files are compared by their prefixes and versions (leading zeros are ignored in version numbers, see example below).  If an input string does not match
             the pattern, then it is compared using the byte compare function.  All string comparisons are performed in C locale, the locale environment setting is ignored.

             Example:
             $ ls sort* | sort -V
             sort-1.022.tgz
             sort-1.23.tgz
             sort-1.23.1.tgz

gMan1990 avatar Mar 21 '19 08:03 gMan1990

This might be helpful? https://stackoverflow.com/questions/12255554/sort-versions-in-python/12255578

yellowsoar avatar Oct 12 '20 08:10 yellowsoar