I have encountered some malware on my Linux server, and am trying to remove it from many php files.
I've tried endlessly with grep | sed and grep | tr and couldn't even erase a simple text string, getting different errors.
When trying:
grep -l '@error' * | xargs -0 sed -i 's/error/nothing/g'
I receive an error message:
can't read filename.php
Using Terminal on Mac - maybe it's an OSX syntax problem?
My final task is to delete a long string of code from all the files - one that includes some $,!,?,<,>,\," symbols - will I need to backslash them?