Quantcast
Channel: GREP find and use SED to replace string on all files - Server Fault
Browsing latest articles
Browse All 3 View Live

Answer by 200_success for GREP find and use SED to replace string on all files

Sed is the wrong tool, because it only considers a line at a time.Awk is a much better tool for taking action on content between two matching lines.awk '/a/,/b/ { next } { print }'will skip everything...

View Article



Answer by glenn jackman for GREP find and use SED to replace string on all files

Instead of<?[.*]#0c0896#[.*]#\/0c0896#[.*]?>use<?.*#0c0896#.*#\/0c0896#.*?>A bracket expression matches only one single character, it that character is in the brackets. Also inside a...

View Article

GREP find and use SED to replace string on all files

One of our old hosted Joomla sites suffered a JavaScript injection, and im going through cleaning it up. The following code was inserted into every .php or .js file:<?#0c0896#echo "<script...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images