[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: |
Duke Normandin |
Subject: |
Re: [Bug-ed] inserting a newline after a word in a line |
Date: |
Sat, 20 Mar 2010 19:05:19 -0600 (MDT) |
User-agent: |
Alpine 2.01 (OSX 1266 2009-07-14) |
On Sat, 20 Mar 2010, Karl Berry wrote:
> s/break_here/break_here\n/p
>
> but the "\n" doesn't work in ed. Is there a way to do this?
>
> Escape a literal newline with \.
>
> s/break_here/break_here\
> /p
>
> See the description of the "s" command in the manual.
>
> However, I think what I would actually do in your situation is run fmt
> on the text :).
I'll read 'man 1 fmt', but what I'mtrying to do is get comfortable
with 'ed'. So I'll do it the long-way round for the time being. ;)
Thanks for your input!
--
duke