Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 1997 13:41:46 -0500 (CDT)
From:      "Paul T. Root" <>
To: (Victor A. Sudakov)
Cc:        questions@FreeBSD.ORG
Subject:   Re: sed question
Message-ID:  <>
In-Reply-To: <> from "Victor A. Sudakov" at "Jul 14, 97 10:12:55 pm"

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
In a previous message, Victor A. Sudakov said:
> 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"

sed "s/^J/ /g"

should work. That's Ctl-J not ^J
> 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

I don't have the authority to approve that.
--from "Excuses, Excuses" *the* compendium of excuses by Leigh W. Rutledge

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