[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-ed] inserting a newline after a word in a line
From: |
John Cowan |
Subject: |
Re: [Bug-ed] inserting a newline after a word in a line |
Date: |
Sat, 20 Mar 2010 00:53:26 -0400 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Duke Normandin scripsit:
> Didn't work for me. ;( When I entered the "return key" for a literal
> newline, ed thought I was done, and displayed the entire "long" line
> unchanged. I never did get as far as entering the /p.
Sorry, I left out the \ escape.
s/break_here/break_here\
/p
In other words, \ followed by newline is an explicit newline, just as \& is
an explicit ampersand. However, that will not work on the pattern side,
because ed matches each line separately.
--
John Cowan http://ccil.org/~cowan address@hidden
In might the Feanorians / that swore the unforgotten oath
brought war into Arvernien / with burning and with broken troth.
and Elwing from her fastness dim / then cast her in the waters wide,
but like a mew was swiftly borne, / uplifted o'er the roaring tide.
--the Earendillinwe