I want to use wget with a cron job to pull a file every day, however I want it to pull the previous day's file from the remote server and the file is controlled by date variables in the URL as such:
http://example.com/export/file.csv?DateRange=20150429,20150429
I can pull the current date using this:
/usr/bin/wget --output-document=/file.csv "http://example.com/export/file.csv?DateRange=`date +%Y%m%d`,`date +%Y%m%d`"
This file is no good, though; I want to pull yesterday's date and not today's.
Is there a way I can subtract 1 day?
%
needs escaping with\
– Gixxy22 May 01 '15 at 13:16%
is for marking a newline, or something like that. – muru May 01 '15 at 13:18