I want to go recursively through a directory and search for specific content in all files. The content should then be replaced if found. With a single line I would make something like this:
find . -type f -exec sed -i -e 's@code2replace@@g' {} \;
It sometimes worked and sometimes not (not sufficient hard drive space ...). Now I would need something for a multine replacement. The orignal file should be overwritten and the multiline pattern could be rather long. So perhaps storing in an external file would be easier I think.
The code which should be replaced looks like the following:
#c3284d#
echo(gzinflate(base64_decode("sylOLsos....")));
#/c3284d#
Also which characters do I have to escape?