You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it's just alphabetical, leading to filenames without leading zeros to be improperly ordered.
Instead of 1, 2, 3, ...10 it's 1 10 2 3.
You can rename your files to a proper naming scheme, but this is a headache.
If there are any special characters or spaces in the file names, it can be trouble trying to figure out how to even process them to remove the offending characters.
The leading zeros need to be in proper amount (eg 001 through 099 ... or 0001 through 0462) so the best way to do this is with a loop... but this ALSO has to have proper numeric ordering, otherwise there is still an issue. I recently started having that issue with for in, the result is that you need to do something like this:
for a in ls * | sort -V; do
which brings up the issue that ls is recursive with just a wildcard, however that can be fixed by specifying more (for instance *.jpg).
TL;DR: it's a lot of reading around and tinkering to try and fix something that shouldn't really be an issue.
The text was updated successfully, but these errors were encountered:
I'd just like to add that the current "pure alphabetical" sort behavior is my preferred behavior (natural sorting can mis-sort some schemes, such as hashed names or key prefixes that get ignored, etc). It's also a preferred behavior for many developers in some areas (eg, file browsers). However, I'd be happy to see natural sorting as an option (even as default), as long as "pure alphabetical" was available.
Currently it's just alphabetical, leading to filenames without leading zeros to be improperly ordered.
Instead of 1, 2, 3, ...10 it's 1 10 2 3.
You can rename your files to a proper naming scheme, but this is a headache.
If there are any special characters or spaces in the file names, it can be trouble trying to figure out how to even process them to remove the offending characters.
The leading zeros need to be in proper amount (eg 001 through 099 ... or 0001 through 0462) so the best way to do this is with a loop... but this ALSO has to have proper numeric ordering, otherwise there is still an issue. I recently started having that issue with for in, the result is that you need to do something like this:
for a in
ls * | sort -V
; dowhich brings up the issue that ls is recursive with just a wildcard, however that can be fixed by specifying more (for instance *.jpg).
TL;DR: it's a lot of reading around and tinkering to try and fix something that shouldn't really be an issue.
The text was updated successfully, but these errors were encountered: