I have daily cron jobs that clobber their old log files everyday.

How can I automate keeping the last 3 log files and delete the oldest one
everyday?

Is this a job for bash or perl?

I've tried to fabricate a unique log file name inside of "crontab -e" with
`date` but the backtick trick does not seem to work there.  I think I have
to have cron call a bash or perl script, the bash or perl script figure out
a unique log file name, delete any old log files, and call the actual perl
script that finally gets some work done and redirecting its output to a
unique file name. Whew! Is there not a simpler way?

Thanks,
Siegfried 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to