Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 1997 13:41:46 -0500 (CDT)
From:      "Paul T. Root" <proot@horton.iaces.com>
To:        vas@vas.tomsk.su (Victor A. Sudakov)
Cc:        questions@FreeBSD.ORG
Subject:   Re: sed question
Message-ID:  <199707141841.NAA06629@horton.iaces.com>
In-Reply-To: <199707141412.WAA00782@vas.tomsk.su> 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
> http://www.tomsk.su/r/persons/vas.htm
> 
> 


-- 
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: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707141841.NAA06629>