Hi there,
Now I hope you guy's don't start laughing out loud, but I'm just getting
involved with procmail since 2 month's and I'm cornered with a little
problem.
What I want to do is the following. I want to take the date from the Date
field of a message and use that to create a string in the format
yymmdd corresponding with the date of the message. This is what I got:
DATE=\"`formail -xDate:`\"
DATEFILE=`date -d $DATE +%y-%m-%d`
If I take a look at the log output I come up with:
procmail: Assigning "DATE=" Tue, 17 Sep 2002 19:22:12 +0100""
procmail: Executing "date,-d,",Tue,,17,Sep,2002,19:22:12,+0100",+%y-%m-%d"
date: too many non-option arguments
Try `date --help' for more information.
procmail: Assigning "DATEFILE="
It seems that the comma's in $DATE screw the whole thing up.
Who helps?
PS I´m aware the date gets converted to local time, it´s intentional.
--
Flon's Law:
There is not now, and never will be, a language in which it is
the least bit difficult to write bad programs.
pgpswD8Kcjg5b.pgp
Description: PGP signature