• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [OT] replace newline character with sed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: [OT] replace newline character with sed
      • From: "J.Huelsmann" <email@hidden>
References: 
 >[OT] replace newline character with sed (From: "J.Huelsmann" <email@hidden>)

  • Prev by Date: Re: drag and drop to another application
  • Next by Date: Tunneling mouse events through windows?
  • Previous by thread: [OT] replace newline character with sed
  • Next by thread: Re: [OT] replace newline character with sed
  • Index(es):
    • Date
    • Thread