On Wed, Oct 05, 2005 at 04:42:20PM -0500, Mr Duck wrote:
Dallman Ross wrote:
in procmail, you'll need to be able to read in today's date from
a file. You could generate it once daily via cron. It would
contain, e.g.:
TODAY = 20051005
Would there really be that much of a performance hit using:
TODAY = `date +"%Y%m%d"`
instead of reading from a file? After all, the recipe will
still have to spend some cycles loading the file data.
I just ran a test on my system to check this, and my results are:
Reading from a file 10,000 times takes 29 seconds.
Using the date command 10,000 times takes 33 seconds.
You're spawning a shell 10,000 times.
It's not a big hit. The date command is not heavy-duty.
But the OP asked very specifically, "is there an all-procmail
way?" Answer: yes.
Once you set up the cron job, you save a tiny bit every
day forever.
--
dman
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail