Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 1997 22:12:55 +0800 (TSD)
From:      "Victor A. Sudakov" <>
Subject:   sed question
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help

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

Want to link to this message? Use this URL: <>