What is the problem in that loop please?
while read result do filenames[ $j ]="$result" filedates[ $j ]=$(stat -c %y ${filenames[ $j ]} | cut -d ' ' -f1) (( j++ )) done << (ls -t *.gz) I am getting this error:
script.sh: line 13: syntax error near unexpected token `(' script.sh: line 13: `done << (ls -t *.gz)'