Skip to main content
1 of 3

As Jeff pointed out, it will be easier to create your array sorted, as in:

files=$(ls -tr ~/a ~/b ~/c)