Code:
foundc=0
nfoundc=0
fflist=""
nflist=""
for file in $FILELIST
do
if [[ -s "${file}" ]];then
# file is found and is > 0 bytes.
foundc=$(( found + 1 ))
fflist="${fflist}\n${file}"
...do something else you want...
else
# file is not found or is 0 bytes
nfoundc=$(( nfounc + 1 ))
nflist="${nflist}\n${file}"
...do something else you want...
fi
done
print "List of found files:\n\n${fflist}\n---------"
print "List of NOT found files:\n\n${nflist}\n-----"
print "number of files in [$FILELIST] found = [${foundc}]\n"
print "number of files in [$FILELIST] NOT found = [${nfoundc}]\n"