Re: [OT] replace a word with a multiline with sed

2010-05-17 Thread Gianluca Cecchi
On *Thu May 13 16:27:09 UTC 2010*, *Mohamed El Morabity *wrote: > Hi, > > simply using the following pattern for sed? >/TAG/c\ >BLABLA\nBLOBLO > > Thanks. I then also found that it works this way too, probably easier to be read: /TAG/c\ BLABLA\ BLOBLO Anyway, thanks again for helping! G

Re: [OT] replace a word with a multiline with sed

2010-05-13 Thread Adam Hough
2010/5/13 Mohamed El Morabity > Le jeudi 13 mai 2010 à 18:14 +0200, Gianluca Cecchi a écrit : > > Hello, > > sorry for the offtopic. it seems a simple thing but I can't find an > > escape char or something correct... > > I have this setup in place > > source file input.txt: > > > > bla bla > > bl

Re: [OT] replace a word with a multiline with sed

2010-05-13 Thread Mohamed El Morabity
Le jeudi 13 mai 2010 à 18:14 +0200, Gianluca Cecchi a écrit : > Hello, > sorry for the offtopic. it seems a simple thing but I can't find an > escape char or something correct... > I have this setup in place > source file input.txt: > > bla bla > bla bla > TAG > bla bla > > sed command file sed.t

[OT] replace a word with a multiline with sed

2010-05-13 Thread Gianluca Cecchi
Hello, sorry for the offtopic. it seems a simple thing but I can't find an escape char or something correct... I have this setup in place source file input.txt: bla bla bla bla TAG bla bla sed command file sed.txt: /TAG/c\ BLABLA BLABLA so that the command sed -f sed.txt input.txt gives as