[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Sed help with append
- Subject: [ale] Sed help with append
- From: ecashin at noserose.net (Ed Cashin)
- Date: Tue, 23 Mar 2010 15:28:00 -0400
- In-reply-to: <1269361869.31619.115.camel@localhost>
- References: <[email protected]> <1269361869.31619.115.camel@localhost>
On Tue, Mar 23, 2010 at 12:31 PM, Michael H. Warfield <mhw at wittsend.com> wrote:
...
> I don't see any way you would have a prayer of making that work.
Yes, the append command is like the one in ed. It adds below the line
in question.
ecashin at meili:/tmp$ echo hi | sed 'ayo'
hi
yo
Sometimes sed's easier to use when you create a less general
solution. If your input looks exactly like what you showed us, and
you don't need generality, you can just put "www." after "ServerName ".
sed 's!ServerName !&www.!' test > result
--
Ed Cashin <ecashin at noserose.net>
http://noserose.net/e/
http://www.coraid.com/