Eu resolvi isso;
Namefile=$1
i=-1
for n in $Namefile*
do
ExDatefile=$(ls -l $Namefile* | head $i | tail -1 )
i=$(($i -1))
IFS=' ' array_Datefile=($ExDatefile)
echo "The file ${array_Datefile[8]} was modified ${array_Datefile[5]} ${array_D$
unset ExDatefile
done
A saída é:
The file hw1_evening_sun.txt was modified May 29 2008
The file hw1_morning_sun.txt was modified May 29 2008
The file hw1_out_si_wire.txt was modified May 29 2008
The file hw1_script.sh was modified Jun 2 15:20
The file hw1_script2.sh was modified Jun 2 15:16
The file hw1_sun1.txt was modified May 29 2008
The file hw1_sun2.txt was modified May 29 2008