I'm cat'ing multiple files in a bash script on OEL 6. for f in /share/scripts/stats/*.stat; do (cat ${f}; echo) >>   /share/scripts/stats/finalmail.html; doneWhen the script is triggered manually it appends all files perfectly. But when the script runs from cron (every 5 mins) sometimes (~10% of the time) only part of the data from 1-2 files are appended. I tried listing file size of each before this cat operation is called. The final file size sometimes is not the sum of all the file sizes.
cat multiple file in script truncates data when scheduled in cron
linux;files;cron;cat