Here they are:
1. CSV_DATE=`date '+%a %b %d'`
2. LIST_DATE was removed.
3. echo-es were deleted.
4. Errors were thrown to /dev/null; when added to cron, this will be re-directed to /dev/null as well.
5. mail was not working so I used EOF for the body:
/usr/ucb/mail -s "Subject here..." $EMAIL_ADD <<\
EOF
# Whatever the content between EOFs will be evaluated a regular formatted text (including blank lines and spaces) except for variable substitution such as here, which will output the result - the current date.
This will be a regular text.
$(date)
EOF
6. Since LIST_DATE was removed, I used 'find' to locate the most recent files that were modified, as:
for CSV in `find /path/of/files -name "some*.csv" -mtime 0\
2> /dev/null`
do
cp -p $CSV /some/httpd/location/
done
I hope, everything will be ok now after this week's test. It'll be submitted for cron-nization!