Is the result of glob expansion sorted?

Assuming regexp is installed, you can loop through files:
for file in (hd0,gpt1)/foo/*
do
 echo $file
done

I'd like to ensure the loop always executes in reverse text sort order
(foo, bar not bar, foo).  So far experiments have all resulted in that
order but I'm not sure if I'm seeing the result of reading files in the
order that the file system happens to have recorded them, or if grub is
deliberately sorting them.

If it's not sorted, how can I sort them?

Reply via email to