I have a bunch of files, starting with a block of code and I'm trying to replace with another.
Replace:
<?php
$r = session_start();
(more lines)
With:
<?php
header("Location: index.php");
(more lines of code)
So im trying to match the block with sed 's/<?php\n$r = session_start();/<?php\nheader...
but it doesn't work.
I would appreciate help in what is happening here and how to achieve this. I'm thinking in doing this with python instead.
Thanks!