I'm trying to sort a huge list of files into the following format:
file-55_357-0.csv
file-55_357-1.csv
file-55_357-2.csv
file-55_357-3.csv
...
Is there a simple way to do this in bash or perl? In other words, is there a way to write the perl script such that it goes through all of them in numerical order? For instance, when I create my @files
, can I make sure the script goes through them all in this sorting -- how could I create a my @sorted
array? I ask because I want to append all these files together vertically, and they need to be in the sorted order. Thanks so much!