Re: lines matching N and N+1
Jim Hill <[email protected]>
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <CAEE75_3pudVZH9+V2PfOR0PrOZjHadPqDwvM62iHm0SwBbcnBg@mail.gmail.com> |
How about
sed -r '/<foo>/!{p;d}; $!N; s/<foo>(.*\n.*)<bar>/FOO\1BAR/'
[Non-text portions of this message have been removed]