I have av script that loops through some statistic files to create a report. We would like to only loop through non-empty files as these files create an empty report-line.
I have figured out how to find the non-empty files, but not how to loop through only those files.
Here is the code that finds the non-empty files:
find stat.* -type f -size +1;
My current loop looks somewhat like this:
for i in stat.* ; do
echo $i
done