I have a number of files I want to update by replacing one multi-line string with another multi-line string. Something along the lines of:

* Some text, 
* something else
* another thing


And I want to replace it with:

* This is completely
* different text


The result would be that after the replacement the file containing the first block of text, will now contain the second string (the rest of the file is unchanged).

Part of the problem is that I have to find the list of files to be updated in the file system, I guess I can use grep for that (though again that's not as easy to do with multiline strings) then pipe it in sed maybe?

Is there an easy way to do this? Sed is an option but it's awkward because I have to add \n etc. Is there a way to say "take the input from this file, match it in those files, then replace it with teh content of this other file" ?
I can use python if need be, but I want something quick and simple, so if there is an utility available, I rather use that than write my own script (which I know how to do).


Question: Align tikzpicture to body text with node as reference
Answer: Simply add at the beginning of your figure:

\useasboundingbox (0,-20) rectangle (3,100);


(The -20 is to make room for the ticks in the x axis)