I am writing a script a check whether exist a backup file every morning Monday to Friday. These backup file is saved in the end of everyday from Monday to Friday only named as
02_10_15
There is a problem that if I run my script on Monday said
09_10_15
It won't find out the file because the file name is
06_10_15
rather than yesterday
08_10_15
Please find my date code below,
#Create variables
yday=$(date --date yesterday +"%d_%m_%y")
#yday="02_10_15"
FileName=$(date --date yesterday +"%Y%m%d")
How can I get the date for Monday special for last Friday.