[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] [PATCH] quilt/mail: remove procmail dependency
From: |
Martin Quinson |
Subject: |
Re: [Quilt-dev] [PATCH] quilt/mail: remove procmail dependency |
Date: |
Tue, 27 Jan 2015 13:49:29 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello,
On Tue, Jan 27, 2015 at 01:05:08PM +0100, Jean Delvare wrote:
>
> I like it too, however I am not so happy with sed being called twice. I
> think we should be able to achieve the same with a single call.
>
> > > + sed -n "/^${header}/,/^[^[:blank:]]/ { /^${header}/ { p; n; };
> > > /^[^[:blank:]]/q; /^$/q; p; }" | sed "s/^${header}//"
>
> I think the following should work equally well?
>
> sed -n "/^${header}/,/^[^[:blank:]]/ { /^${header}/ { s/^${header}//p;
> n; }; /^[^[:blank:]]/q; /^$/q; p; }"
Wow. Even better.
Bye, Mt.
--
On the Internet nobody can hear you being subtle. -- Linus Torvalds
signature.asc
Description: Digital signature