Let's say I have a for loop in bash which looks like this:
for i in $MYDIR/*.jar
do
# do something with files
done
Is the order of iteration guaranteed, i.e. will the loop always process files in same order? If it is guaranteed, is the order alphabetical?
According to the bash man page:
So, the files will be processed in alphabetical order (which depends on your locale, see comments) due to globbing expansion rules.