Quote:
Originally Posted by LaserSpec
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