[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sed command grouping brace match problem
From: |
Davide Brini |
Subject: |
Re: sed command grouping brace match problem |
Date: |
Thu, 21 Jun 2012 09:50:28 +0200 |
On Wed, 20 Jun 2012 22:53:14 +0000, "Caldwell, David (Overwatch Systems)"
<address@hidden> wrote:
> I saw no evidence that my email to
> address@hidden<mailto:address@hidden> had any effect, so now I'm trying
> the email address in the sed --version output.
>
> David
>
> From: Caldwell, David (Overwatch Systems)
> Sent: Friday, June 15, 2012 7:43 PM
> To: 'address@hidden'
> Subject: sed command grouping brace match problem
>
> Hi,
>
> I'm using Cygwin with sed version 4.2.1.
>
> I can't get command grouping to work with both the open & closing braces
> on the same line when one of the commands is "r filename": sed '/pattern/
> { N; N; r fileToInsert }'
That is by design. You have to use either
sed -e '/pattern/ { N; N; r fileToInsert' -e '}'
or a real newline, ie
sed -e '/pattern/ { N; N; r fileToInsert
}'
--
D.