Re: [OT] replace newline character with sed
Re: [OT] replace newline character with sed
- Subject: Re: [OT] replace newline character with sed
- From: Marten van Gelderen <email@hidden>
- Date: Wed, 19 Nov 2003 09:23:34 +0100
Hallo,
Look at man sed for the following:
[2addr]s/regular expression/replacement/flags
... <lots deleted> ...
A line can be split by substituting a newline character
into it.
To specify a newline character in the replacement string,
precede
it with a backslash.
So you should not use '\n' in your replacement string, but a backslash
followed by a real (literal) newline (by hitting the RETURN key).
On 19 Nov 2003, at 7:13 AM, J.Huelsmann wrote:
Hello there,
is there a way to tell sed to use the newline character \n as
replacement?
Something like
sed 's:find:\n:g' input
isn4t working.
Any hints?
TIA,
-- Jan--
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
--
Groeten, Marten
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.