Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 1997 22:12:55 +0800 (TSD)
From:      "Victor A. Sudakov" <vas@vas.tomsk.su>
To:        questions@freebsd.org
Subject:   sed question
Message-ID:  <199707141412.WAA00782@vas.tomsk.su>

next in thread | raw e-mail | index | archive | help
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?199707141412.WAA00782>