Hi all,

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`
echo $date_now
echo $date_char
if ($date_char = Mon) then
cd /scripts/data/
rm storage_bin.000%
else if ($date_char = Tue)
cd /scripts/data/
rm storage_bin.000%
else if ($date_char = Wed)
cd /scripts/data/
rm storage_bin.000%