Date: Sun, 14 Mar 2004 18:35:22 -0700 (MST) From: Warren Block <wblock@wonkity.com> To: Rob Ellis <rob@web.ca> Cc: freebsd-questions@freebsd.org Subject: Re: [OT] sed question Message-ID: <20040314181756.Q48867@wonkity.com> In-Reply-To: <20040315001834.GA9303@web.ca> References: <4054DD10.5060504@stevenfettig.com> <20040314164347.X35552@wonkity.com> <20040315001834.GA9303@web.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 14 Mar 2004, Rob Ellis wrote: > This works with sed in /bin/sh and ksh: > > sed -e 's/ */\ > /g' my_test_text_document.txt > > I.e., escape an actual newline. I used to do that, or include an actual newline in a script, but it just seems wrong from maintainability and readability standpoints. It seems slightly better to get a newline in a shell variable and then use that. -Warren Block * Rapid City, South Dakota USA
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040314181756.Q48867>