hankknight
asked on
Linux: Insert 1 hour old timestamp into wget found in .sh script
I use the following code in a script called updatedb.sh to automatically update a database.
A crontab task is setup to run the script every hour.
Instead of using the hardcoded value of 1372258535 how can I get a timestamp value from one hour ago?
A crontab task is setup to run the script every hour.
Instead of using the hardcoded value of 1372258535 how can I get a timestamp value from one hour ago?
#### updatedb.sh ###
wget https://example.com/data.aspx?modified=1372258535 -q --output-document /tmp/dataDump.txt
mysql -u DATABASE_USERNAME -pDATABASE_PASSWORD DATABASE_NAME < /tmp/dataDump.txt
rm /tmp/dataDump.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.