sed experts. Help
Jared Greenwald
greenwaldjared at gmail.com
Thu Oct 23 04:54:10 UTC 2008
there's nothing that says you need to do all the files in one sed
command, right?
something like this should work...
find <dir> -type f -exec sed -i.bak 's/^<?php eval(base64_decode(.*.$//' {} \;
...Not only will it do all the line removal, it will also make backups
(as <file>.bak) so if you screw up you will have the original files to
revert.
-Jared
On Thu, Oct 23, 2008 at 12:22 AM, Rick Knight <rick_knight at rlknight.com> 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?
>
> Thanks,
> Rick
>
> --
> kubuntu-users mailing list
> kubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
>
More information about the kubuntu-users
mailing list