On Wed, 12 May 1999 08:39:01 -0400 (EDT), Justin Lloyd
<jlloyd(_at_)harris(_dot_)com> wrote:
How about this for reporting more than 1 To: line? (code is untested)
Just as a reminder, these things +are+ rather easy to test.
$ cat <<'HERE' >/tmp/foo.rc
:0
* 0^-1
* 1^1 ^To:
{ LOG = "There were $= To: lines" }
HERE
$ procmail DEFAULT=/dev/null SHELL=/bin/sh /tmp/foo.rc <<HERE
To: one
To: too
From: me
To: you
HERE
There were 3 To: lines
Unsurprisingly, this works. It's not clear to me what good the first
condition does, though.
$ cat <<'HERE' >/tmp/bar.rc
:0
* 1^1 ^To:
{ LOG = "There were $= To: lines" }
HERE
$ procmail DEFAULT=/dev/null SHELL=/bin/sh /tmp/bar.rc <<HERE
To: one
To: too
From: me
To: you
HERE
There were 3 To: lines
Hope this helps,
/* era */
Remember to clean up after yourself, too.
$ rm /tmp/foo.rc /tmp/bar.rc
--
.obBotBait: It shouldn't even matter whether <http://www.iki.fi/era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>
* Sign the European spam petition! <http://www.politik-digital.de/spam/en/> *