yesterday=$(date --date="-1 day" +%Y%m%d)
file="file-${yesterday}.csv"
day=720 #12 hours
#is there a new file? ...
if [ "$( find ${file} -cmin -${day} )" ]; then
echo copying new ${file} to folder/ ...
cp ${file} folder/.
fi
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter