Hi,
I have creating this incredible backup script, but my OS (OSX Leopard) seems to be having a peoblem with the following lines:
Code:
lday=`date +'image-%Y-%m-%d-%H' -d '1 day ago'`
lweek=`date +'image-%Y-%m-%d-%H' -d '1 week ago'`
When the scrpt executes I get the following error:
Code:
date: illegal time format
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
date: illegal time format
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
I've narrowed it down to my usage of the -d '1 day ago' operators. Could anybody tell me what could be wrong with this....or if there's another way to get yesterday's date and last week's date?
Thank you very much in advance.