Re: lines matching N and N+1
Davide Brini <[email protected]>
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 1 Feb 2013 11:03:38 +0100, Davide Brini <[email protected]> wrote: > > t > > There's no harm in printing the first line of the pattern space, so the > "t" can be removed. In fact, every time "t" is executed, you're > effectively adding two more lines to the pattern space without removing > the existing ones. This can lead to false matches in the s::: replacement > (ie, times where foo and bar are more than one line apart, yet the > replacement succeeds). This is of course wrong. The appropriate remark is that by using "t", the two lines currently in the buffer are printed at once, and foo/bar pairs can be missed if "foo" is in the second of the two lines being printed. Either way, "t" is at best useless. -- D.