Re: sed command grouping brace match problem
Davide Brini <[email protected]>
| Newsgroups | gmane.comp.gnu.utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 20 Jun 2012 22:53:14 +0000, "Caldwell, David (Overwatch Systems)" <[email protected]> wrote: > I saw no evidence that my email to > [email protected]<mailto:[email protected]> 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: '[email protected]' > 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.