sed experts. Help
rick_knight at rlknight.com
Thu Oct 23 16:49:40 BST 2008
Alexander Smirnov wrote:
> Rick Knight wrote:
>> Sed experts,
>> I have a bunch of php scripts, over 1000, that all need to have 1 line
>> removed. The line begins with...
>> <?php eval(base64_decode(
>> and is at the top of each file. How would I construct a sed command to
>> remove this line from every file in a directory and it's subs?
> why sed? you can use excluding option of grep:
> $grep - v "<?php eval(base64_decode( "
> will match every line but not mentioned.
Doesn't have to be sed. Sed just came to mind as a way to do what I need
to do, remove a line of code from the top of several php files. I know
how to use grep to find the line of text. How would I use grep to remove
it? WOuld I pipe the output of grep to rm?
More information about the kubuntu-users