Date: Mon, 14 Jul 1997 16:27:17 -0600 From: Kenneth Ingham <ingham@i-pi.com> To: "Victor A. Sudakov" <vas@vas.tomsk.su> Cc: questions@FreeBSD.ORG Subject: Re: sed question Message-ID: <19970714162717.58653@socrates.i-pi.com> In-Reply-To: <199707141412.WAA00782@vas.tomsk.su>; from Victor A. Sudakov on Mon, Jul 14, 1997 at 10:12:55PM %2B0800 References: <199707141412.WAA00782@vas.tomsk.su>
next in thread | previous in thread | raw e-mail | index | archive | help
You could also use tr: tr '\n' ' ' Kenneth On Mon, Jul 14, 1997 at 10:12:55PM +0800, Victor A. Sudakov wrote: > Hello. > > I understand that my question is not FreeBSD specific, it is rather generic. > However, there are so many unix gurus here ;-) > > So, if I want to replace newlines in a file with spaces, it would be natural > to run such a sed script: > > sed "s/\n/ /g" > > However it does not work and it should not work, as the man page states, > that the newline characters are not allowed in replacement strings. > > So, what should I do? > > And a related question: is there any good source of information on sed? > Probably with examples? The thing seems to be very powerful and I wish to > learn it, but the man page is too spartan. > > Thanks a lot. > > -- > Victor Sudakov > http://www.tomsk.su/r/persons/vas.htm
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970714162717.58653>