I take that back, the following sed command works:
sed 's/ */ /g'
^^
2 spaces here
On Wed, Apr 04, 2001 at 01:51:24PM +0000, Trevor Jenkins wrote:
On Tue, 3 Apr 2001, Timothy Luoma <elists(_at_)1stpc(_dot_)org> wrote:
SUBJECT=`formail -xSubject: | sed s'/\[scfn-list\] //g'`
Inspired by this suggestion I tried to use sed so as to eliminate multiple
spaces in Subject lines.
Here's a live one from a list
Subject: Re: spelling diagonal angle
I have an existing rule that inserts a tag at the start of the text so I
get:
Subject: [TAG] Re: spelling diagonal angle
but what I want is
Subject: [TAG] Re: spelling diagonal angle
that is all multiple spaces removed. So i changed the sed script to be
SUBJECT=`formail -xSubject: | sed s'/ / /'g`
which worked in as much as it took out some of the multiple spaces. A
couple where left in. Fiddling about the sed script I tried
SUBJECT=`formail -xSubject: | sed ": loop s'/ / /'g t loop"`
but that results in various errors being reported. Nothing gets assigned
to SUBJECT, of course.
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
--
John Patton patton66(_at_)home(_dot_)com
Get my GnuPG public key: finger john(_at_)24(_dot_)22(_dot_)215(_dot_)225
"Of those who say nothing, few are silent."
- Thomas Neill
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail