Re: stripsubject

From: Martin Schulze <joey_at_finlandia.Infodrom.North.DE_at_hypermail-project.org>
Date: Tue, 1 Feb 2000 22:11:27 +0100
Message-ID: <20000201221127.Z7052_at_finlandia.infodrom.north.de>


Eric Luhrs wrote:
>
> Hello,
> I am trying to process a list which has a digest number prepended to the
> subject line. The problem is that the digest number increases by one each
> time a digest is sent--so I can't force stripsubject to remove "STRING
> 1.001" because the next message will be prefaced with "STRING 1.002" so
> forth, and so on. Stripsubject obviously can't accept a value like
> "STRING*" but will it take a range, such as "STRING [1-1000]"? Is there
> another way to deal with this problem? Thanks in advance.

Use procmail + formail

  :0 fhw
  | sed 's/^Subject: [1-9]\.[0-9]*/Subject: /'

  :0
  | hypermail ...

or

   SUBJECT=`formail -X Subject`
   NEW=`echo "$SUBJECT"| sed 's/^Subject: [1-9]\.[0-9]*/Subject: /'`

   :0 fhw
   | formail -i "$NEW"

   :0
   | hypermail...

or something like that.

Regards,

        Joey

-- 
A mathematician is a machine for converting coffee into theorems.
Received on Tue 01 Feb 2000 11:56:26 PM GMT

This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:12 AM GMT GMT