3 Nov
2004
3 Nov
'04
11:56 a.m.
On Wed, Nov 03, 2004 at 11:42:16AM +0000, MJ Ray wrote:
On 2004-11-03 11:25:14 +0000 Brett Parker <iDunno@sommitrealweird.co.uk> wrote:
it will cheerfully play with any of the headers that happen to have [ALUG] in them. Not nice.
Correct.
sed 's/^\(Subject: .*\)\[ALUG\] \(.*\)$/\1\2/;' which will *only* play with the Subject header.
Why not sed '/^Subject: /s/\[ALUG\]//' # instead? The leading regex means that the s command will only act on matching lines.
Purely because I pulled it out of my arse, and it was an improvement on the previous. Yours is probably quicker, overall, though. Cheers, -- Brett Parker web: http://www.sommitrealweird.co.uk/ email: iDunno@sommitrealweird.co.uk