I've setup cron jobs to kick off certain processes and write logs generated by those processes. The log uses a data variable in the name so the log files have the date incorporated into the name of the file (i.e. 120299.file.txt).
The way the date is appended to the file is by setting a variable - see the following:
savegrp -c winframe NT > /home/scripts/logs/$LOG_FILE.winframe.NT.log 2>&1
I now have the need to set up a cron job, which will delete all the log files preceded by the date from two days before the current date. Is it possible to set a variable, which is equal to the system date minus two days? I would then use "rm" to remove all the files preceded by that variable.