Hello,
I have an array that contains a list of files from a given IFS directory.
The size of this array is say 1000.
As the filename are not loaded in the array based on the sequence in which they were created in the IFS directory, I need to sort (ascending) the array based on the filename.
However, when I do, I get all of the blank array elements first. Which means I need to check maybe 999 elements first.
How do I sort and array in ascending sequence, but I'm only interested in sorting those elements that have a filename in it.
file0010.txt
file0005.txt
file0015.txt
should be sequenced to;
file0005.txt
file0010.txt
file0015.txt
thankyou.
I have an array that contains a list of files from a given IFS directory.
The size of this array is say 1000.
As the filename are not loaded in the array based on the sequence in which they were created in the IFS directory, I need to sort (ascending) the array based on the filename.
However, when I do, I get all of the blank array elements first. Which means I need to check maybe 999 elements first.
How do I sort and array in ascending sequence, but I'm only interested in sorting those elements that have a filename in it.
file0010.txt
file0005.txt
file0015.txt
should be sequenced to;
file0005.txt
file0010.txt
file0015.txt
thankyou.
Comment