A simple shell script for removing Movable Type comment spam from archived MT html pages. To be run in your mt/archive folder
#!/bin/bash
find . -type f -group nobody | sed ‘s/^\..//g’ > mtcomment.txtfor i in `cat mtcomment.txt`;
do zfile=$i;
xfile=${zfile%.html}.htmlbak;
sed ‘/<* di* * vclass=\”comments-body\”/,/<\/di* *v>/d’ $i > $xfile;
mv -f $xfile $i;
donerm mtcomment.txt
Note, you’ll need to remove the two asterisks (**) from the sed line in the do. Blogger won’t let me publish that.








Yeah, I kinda wonder why people use Movable Type when there are other options out there that work just as well, or possibly better. I for one use XOOPS for the two sites I run on ibiblio… PrezKennedy.org and Open Source Gaming.
XOOPS wasn’t specifically designed to be a blog, but it does the job quite well. I haven’t had a single piece of comment spam yet!
My friggin post about comment spam got comment spammed. Now that is just poetic justice.
The servers have certainly been running much faster lately. Maybe a combination of new hardware plus disabling certain unsecure features on weblog software has been the reason for it.