Good evening to all!!
I'm facing this problem:
I saved in a txt a list of files name (one txt for every folder):
hello0.jpg
hello1.jpg
hello10.jpg
hello11.jpg
hello12.jpg
hello13.jpg
hello14.jpg
hello15.jpg
hello16.jpg
hello17.jpg
hello18.jpg
hello19.jpg
hello2.jpg
hello20.jpg
hello21.jpg
hello22.jpg
hello23.jpg
hello24.jpg
hello3.jpg
hello4.jpg
hello5.jpg
hello6.jpg
hello7.jpg
hello8.jpg
hello9.jpg
and I would like to sort them using the numbered part.
Using sort -n I get the aforementioned sorting.
The real problem is that I don't have a fixed pattern for files name (otherwise I could use sort with -k).
It could be:
hello0.jpg
helloagain0.jpg
hello1_0.jpg
Only thing I know is that all files in the same folder will have same pattern.
Any help is appreciated!!