Thanks a lot for your super fast reply!!
Does this work even with this filename:
JonnyDouble01_pg001.jpg
JonnyDouble01_pg002.jpg
.....
where there are more than one numeric part (one is the same for all files, the other is the key to sorting...)
---------- Post updated 06-05-12 at 05:05 AM ---------- Previous update was 06-04-12 at 04:01 PM ----------
Using these files, I can't get to sort them:
h0ello0.jpg
h1ello1.jpg
h2ello10.jpg
h3ello11.jpg
h4ello12.jpg
h5ello13.jpg
h6ello14.jpg
h7ello15.jpg
h8ello16.jpg
h9ello17.jpg
h10ello18.jpg
h1ello19.jpg
h12ello2.jpg
h13ello20.jpg
h14ello21.jpg
h15ello22.jpg
h16ello23.jpg
h17ello24.jpg
h18ello3.jpg
h19ello4.jpg
h20ello5.jpg
h21ello6.jpg
h22ello7.jpg
h23ello8.jpg
h24ello9.jpg
That's because they have more than one numeric part.
Only common things among all files is that the are numbered in the end of the name (before the extension).
Only way I found to srt them is to remove the extension (.jpg or whatever), than read one char at a time from the end of each string and stop when the char isn't a number.
That's the starting point of the numeration and I can use sort -k option...
Now I need to find correct commands!