procmail
[Top] [All Lists]

Re: [PROCMAIL] RE: Removing multiple spaces from Subject lines was Re: long mailing-list names in Subject line

2001-04-04 09:50:44
On Wed, 4 Apr 2001, Timothy J. Luoma <tjlists(_at_)bigfoot(_dot_)com> wrote:

Try
      SUBJECT=`formail -zxSubject:`

Great that got rid of the leading spaces. :-)

      SUBJECT=`formail -xSubject: | sed 's/^ */ /g'`

I had to try this without the ^ because (as in my original example) some
Subject lines have multiple spaces within them.

Subject:      Re: spelling  diagonal angle

So using the -zx option on formail gives me

Subject: Re: spelling  diagonal angle

whereas I want

Subject: Re: spelling diagonal angle

(note the extra space between "spelling" and "diagonal" in the first one).

When I use sed with 's/ */ /g' what I ended up with was

Subject:  R e :  s p e l l i n g  d i a g o n a l  a n g l e

Not at all what I wanted! :-( Even quoting the space to make the sed
instruction

/\ */ /

hasn't helped. Still gives me the spaced out version.

So I'm getting there but not quite as quickly as I should.

Regards, Trevor

British Sign Language is not inarticulate handwaving; it's a living language.
Support the campaign for formal recognition by the British government now!

-- 

<>< Re: deemed!


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>