Unanswered: Remove Files according to System Date instead of File Names
I am currently developing a shell script whereby i will need to put it up as cronjob to remove excess files in memory.
Here is how it goes. For example today is Monday and i assign a variable $date_char = Mon with reference the system date.
Then i will need to delete all the files under the system date with Mon instead of the file names with "Mon".
Here is my draft script.
set date_char=`date +%a`
set date_now=`date +%y%m%d`
if ($date_char = Mon) then
else if ($date_char = Tue)
else if ($date_char = Wed)