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
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