Scunningham99
Programmer
Hi All
I have no experience in UNIX script. so please bear with me! Crontab uploads a file namely 'rcc1_gvc_sales.csv' every morning! this is reliant on the file being refreshed by another server every day, else same file is uploaded again. This is bad, so my aim is to code a check which checks the date of the file.
Ie. if the file creation date is NOT = to todays date then touch the file so it is blank, hence blank file is uploaded, meaning the same file has not being uploaded twice.
the problem i have got is i do not know the command to check creation date or somewat of file!!!!!
if [ rcc1_gvc_sales.csv != "todays date HELP" ]; then
touch rcc1_gvc_sales.csv #to make the file blank
fi;
ANY CLUES WOULD BE GREATLY APPRECIATED!!!
I have no experience in UNIX script. so please bear with me! Crontab uploads a file namely 'rcc1_gvc_sales.csv' every morning! this is reliant on the file being refreshed by another server every day, else same file is uploaded again. This is bad, so my aim is to code a check which checks the date of the file.
Ie. if the file creation date is NOT = to todays date then touch the file so it is blank, hence blank file is uploaded, meaning the same file has not being uploaded twice.
the problem i have got is i do not know the command to check creation date or somewat of file!!!!!
if [ rcc1_gvc_sales.csv != "todays date HELP" ]; then
touch rcc1_gvc_sales.csv #to make the file blank
fi;
ANY CLUES WOULD BE GREATLY APPRECIATED!!!