Handy little script. Note that when you run it you should be logged as the web server user. The file's owner and group will get changed to whoever you run the script as. Also, the files will have the permissions changed to whatever that users umask is set to, which will probably be 644 and okay.
I also had to change:
Code:
for i in `grep -lr $a`
to:
Code:
for i in `grep -lr $a *`
for it to run on my Suse system.