When I have the files a.txt
, b.txt
and c.txt
is it guaranteed that
cat *.txt > all_files.txt
or
cat ?.txt > all_files.txt
will combine the files in alphabetical order?
(In all my tests, the alphabetical order was preserved, but I'm not sure because for example with ls
the order is undefined and need not be alphabetic - but it often is, because the files have often been written to the directory alphabetically)