From owner-freebsd-questions Mon Jul 14 11:03:56 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA05194 for questions-outgoing; Mon, 14 Jul 1997 11:03:56 -0700 (PDT) Received: from mpeks.tomsk.su (mpeks.tomsk.su [193.124.185.19]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id LAA05167 for ; Mon, 14 Jul 1997 11:03:16 -0700 (PDT) Received: (from root@localhost) by mpeks.tomsk.su (8.6.11/8.6.9) with UUCP id CAA22746 for questions@freebsd.org; Tue, 15 Jul 1997 02:02:16 +0800 Received: (from vas@localhost) by vas.tomsk.su (8.8.5/8.8.3) id WAA00782 for questions@freebsd.org; Mon, 14 Jul 1997 22:12:55 +0800 (TSD) From: "Victor A. Sudakov" Message-Id: <199707141412.WAA00782@vas.tomsk.su> Subject: sed question To: questions@freebsd.org Date: Mon, 14 Jul 1997 22:12:55 +0800 (TSD) Organization: Tomsk Region Education Department X-Mailer: ELM [version 2.4ME+ PL22 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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