A very basic version to do this would be:
# Example rm-files.sh - deletes all of the files in the directory it is run
# from that contain the string LINUXFORUMS
for i in *; do
if grep 'LINUXFORUMS' $i >/dev/null ; then
rm -v $i
You could save this in ~/bin and use it by changing to the directory containing the files and running it as ~/bin/rm-files.sh. It should have the search string passed in as a parameter and it should have some sanity checking - do you really want it deleting all matching files if you mis-typed the search string? etc, etc...
Have a look at the Advanced Bash Scripting Guide
- it's well worth a read.