linux sed command help
Budget: $10 – $30 USD
I would like someone to give me the exact syntax to run a sed command on Ubuntu 18.04 LTS to remove a line for many text files.
I want to remove this line:
<?php include $_SERVER['DOCUMENT_ROOT']."test.php"; ?>CRLF
The line ends with a CR (carriage return) and LF (line feed) OR only with a LF (line feed).
I need to remove this line from thousands of files and I tried all kinds of variations but I cannot find the right syntax.
I used something like this:
find ./ *.html -type f -exec sed -i 's/\<\?php\ include\ \$\_SERVER\[\'DOCUMENT\_ROOT\'\]\.\"test\.php\"\;\ \?\>/d' {}
based on this:
find ./ *.html -type f -exec sed -i 's/test1/test2/g' {}
Thanks
I want to remove this line:
<?php include $_SERVER['DOCUMENT_ROOT']."test.php"; ?>CRLF
The line ends with a CR (carriage return) and LF (line feed) OR only with a LF (line feed).
I need to remove this line from thousands of files and I tried all kinds of variations but I cannot find the right syntax.
I used something like this:
find ./ *.html -type f -exec sed -i 's/\<\?php\ include\ \$\_SERVER\[\'DOCUMENT\_ROOT\'\]\.\"test\.php\"\;\ \?\>/d' {}
based on this:
find ./ *.html -type f -exec sed -i 's/test1/test2/g' {}
Thanks