Quote:
Originally Posted by ReaderGuy42
I have numbered a series of books, as they're in a long series (The Legend of Drizzt with upwards of 40 books), so I can tell which order they go in.
However, now when I sort them by title, they appear numbered like shown in the title, e.g.
1, 10, 11, 12 . . . 2, 20, 21, 22, and so on.
I'm not sure if this is a Linux issue because I was recently having similar issues in my Linux Mint file explorer. Or is there a way to have the numbers be sorted correctly?
Thanks 
|
Keyword: Alphasort
The sort is by CHARACTER weight (
position in the ASCII table),
not the numeric value of digits included in the string.
The common way to make strings sort is to pad the leading places (as needed to make the highest number sort).
eg.
highest number
500 then pad 00 for single digit, 000 if 0
20 then a single 0 pad
You could use a space (ASCII%20), but those are really hard to see if you counted right, on most screens.
FWIW I commonly steer folder sorts by using a leading number:0First (or force to the end:zMakethislast) lowercase sorts AFTER uppercase