I currently have the below lines as part of my script:
#! /bin/csh
set thedate = `date "+%d_%m_%y"`
This sets thedate to today's date.
Does anyone know what I need to add to get the script to pick up yesterday's date instead?
I have tried
date -v "-1d"
date -d "-1 day"
but I get the errors
date: illegal option -- v
date: illegal option -- d
usage: date [-u] mmddHHMM[[cc]yy][.SS]
date [-u] [+format]
date -a [-]sss[.fff]
I have then tried
set thedate = `date "+%d_%m_%y" --date="1 day ago"`
which when echoing thedate, still gives today's date.