From owner-freebsd-questions Tue Dec 29 18:05:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA14946 for freebsd-questions-outgoing; Tue, 29 Dec 1998 18:05:47 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from inet.chip-web.com (c1003518-a.plstn1.sfba.home.com [24.1.82.47]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id SAA14941 for ; Tue, 29 Dec 1998 18:05:45 -0800 (PST) (envelope-from ludwigp@bigfoot.com) Received: (qmail 29176 invoked from network); 30 Dec 1998 02:05:26 -0000 Received: from speedy.chip-web.com (HELO speedy) (172.16.1.1) by inet.chip-web.com with SMTP; 30 Dec 1998 02:05:26 -0000 Message-Id: <4.1.19981229180440.00a49ac0@mail-r> X-Sender: ludwigp2@mail-r X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Tue, 29 Dec 1998 18:05:23 -0800 To: Charles Henrich , freebsd-questions@FreeBSD.ORG From: Ludwig Pummer Subject: Re: Sed sillyness (stupid question?) In-Reply-To: <19981229175952.44230@orbit.flnet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 05:59 PM 12/29/98 , Charles Henrich wrote: >Why doesnt this work: > >sed 's,test,te\nst,' > >That is when test is found how come sed doesnt actually print the newline >character? The man page claims it should: > > A line can be split by substituting a newline character into it. > To specify a newline character in the replacement string, precede > it with a backslash. > > >What obviousness am I missing here, anyone? Maybe you need to escape the backslash itself, like sed 's,test,te\\nst,' --Ludwig Pummer ( ludwigp@bigfoot.com ) ICQ UIN: 692441 ( ludwigp@email.com ) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message