On Mon, 30 Sep 2002, raphael wrote:
r> Hi there,
r> Now I hope you guy's don't start laughing out loud, but I'm just getting
r> involved with procmail since 2 month's and I'm cornered with a little
r> What I want to do is the following. I want to take the date from the Date
r> field of a message and use that to create a string in the format
r> yymmdd corresponding with the date of the message. This is what I got:
r> DATE=\"`formail -xDate:`\"
r> DATEFILE=`date -d $DATE +%y-%m-%d`
r> If I take a look at the log output I come up with:
r> procmail: Assigning "DATE=" Tue, 17 Sep 2002 19:22:12 +0100""
r> procmail: Executing "date,-d,",Tue,,17,Sep,2002,19:22:12,+0100",+%y-%m-%d"
r> date: too many non-option arguments
r> Try `date --help' for more information.
r> procmail: Assigning "DATEFILE="
$DATE is being expanded by procmail and being passed to date as a series
of arguments. I have "" around my "$DATE"
# remove the variable
* ^Date: \/.*
DATE_SECS=`date --date "$MATCH" +%s`
# check for missing or bad date outside the recipe
( Please do not email me AS WELL as replying to the list. Personal
email is welcome but may invoke a password autoresponder. )
procmail mailing list