for i in `ls *.fas | sort -V`; do some_code; done;. where sort -V does according to man sort a version sort - a natural sort of (version) numbers ...
Filename expansion in Bash is sorting alphabetically. From the Bash Manual: Bash scans each word for the characters ' * ', ' ? ', and ' [ '. If one of these ...
From the ls docs: -t Sort by time modified (most recently modified first) before sorting the operands by lexicographical order. -U Use time of file ...
In bash or ksh, put the file names in an array, and iterate over that array in reverse order. files=(/var/logs/foo*.log) for ((i=${#files[@]}-1; i>=0; i--)); do bar ...
So, the files will be processed in alphabetical order (which depends on your locale, see comments) due to globbing expansion rules.
Explains how to play mp3 OR other audio/video files in shuffle mode using a mplayer playlist feature under Linux
Short answer: Yes it will. From the bash man page: After word splitting, unless the -f option has been set (see The Set Builtin), Bash scans each ...
As already predicted, the ForEach loop container using ForEach File Enumerator type processed the files in a file name order. This is incorrect ...
ctime originally meant creation time,[12] however it has since been used almost always to refer to inode change time. It is updated any time file ...
Using the sort command: ls */* | sort -rst '/' -k1,1. with: -t '/' to change the field separator; -r to do a reverse sort; -s to ensure the sort is stable (in ...