View Single Post
Old 06-04-2007, 01:28 PM  
ASACP Tim
Confirmed User
 
ASACP Tim's Avatar
 
Join Date: Jan 2003
Posts: 140
Quote:
Originally Posted by LaserSpec View Post
It would help the movement tremendously if someone pasted an easy to use script that webmasters could PASTE into their SSH window to update all .html files w/ the code

Here you go...

find -name '*.html' -exec perl -pi.backup -e 's/(<head>)/$1\n<meta name="RATING" content="RTA-5042-1996-1400-1577-RTA">/i' {} \;

With find it will run the script on any file with an .html extension.

in the command the {} is the name of the file.


This will work in a single directory:

perl -pi.backup -e 's/(<head>)/$1\n<meta name="RATING" content="RTA-5042-1996-1400-1577-RTA">/i *.html
__________________
http://www.asacp.org
http://www.rtalabel.org

Check out our PSA's Are you labeled?

Protecting your business by protecting children

[email protected]
ICQ 1-173-410
Add me at XBiz.net
Add me at AdultWhosWho
ASACP Tim is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote