How to batch edit a list of files?
Posted
by user43144
on Server Fault
See other posts from Server Fault
or by user43144
Published on 2010-05-14T13:56:33Z
Indexed on
2010/05/14
14:04 UTC
Read the original article
Hit count: 191
I have a list of files where I need to remove some lines that have been added yesterday by a spambot. The section I want to remove looks like this:
^M
<script>[...] bunch of malware code [...]</script>
That section seems to have been appended to the files, so I can be relatively sure it's the last lines of each file that contain this part.
Now I know a bit of Linux, but not enough to do this via a command. How would I go about and do this?
© Server Fault or respective owner