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
There is a problem that if I run my script on Monday said
It won't find out the file because the file name is
rather than yesterday
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.