Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2004-06-13, 09:53 AM   #13
swedguy
Vagabond
 
swedguy's Avatar
 
Join Date: Aug 2003
Posts: 2,374
Send a message via ICQ to swedguy
http://www.sponsororganizer.com/FreeScripts/cleo.html

Save the script as cleo.pl

Chmod it to 755

Run:
find /main/domain/dir \( -name '*.html' -o -name '*.php' -o -name '*.htm' \) -exec cleo.pl {} \;

It will run through all your .html, .php and .htm files and delete the code.
Remember that it will open and save all files, even the ones that doesn't have the code in it (it will just not change anything). So if you have any files that are owned by the webserver user, it _might_ change the owner to the user you run the script as.

I made a test run here on a bunch of files with and without the code in, and it worked like a charm. A hot advice is to make a test run in a temp folder

My ICQ is 252081 if you need any help.
Good luck if you decide to use it

swed
swedguy is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:22 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc