I have to delete javascript code (around 8 lines of code) from hundreds of html pages. Any ideas how to do that quickly without hand ?
How to mass delete javascript file from hundreds of pages?
Collapse
X
-
if you have dreamweaverMX, you can do a "find and replace" on a whole folder, local site or remote site.
so if its the same code, it should take you only a few mins to startTrafficadept | Best traffic I have ever tested | web "@t" cuul.orgComment
-
yes, it had to be some fancy program, since every other program can replace only one line and my javascripts is different in almost every second page , I would rather quickly delete all javascript codes by one click.
i have searched for it, but it seems to me that most easiest way is to go custom.Comment
-
prob some awk/sed/regex ninja type stuffSince 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

My Newest ThemeComment
-
yes, it had to be some fancy program, since every other program can replace only one line and my javascripts is different in almost every second page , I would rather quickly delete all javascript codes by one click.
i have searched for it, but it seems to me that most easiest way is to go custom.
look at my reply damm it. dreamweaverMX can do it and you can download a 30trial if you dont already have itTrafficadept | Best traffic I have ever tested | web "@t" cuul.orgComment
-
Yea, about as far as I wanted to play was cd'ing into a directory and running:
ls -f | awk '/.html/ {print "cat " $1}'|sh
I'm sure there's a way to pipe that into a string, reg-out what you don't want and pipe it back into the file. Then again, I remember there being some nifty perl command line thing for it as well... thus I'm no help, but here's a bump for you.Your post count means nothing.Comment
-
-
pressing "ctrl -z" doesn't work?
-----
Here's that perl thing:
http://kb.iu.edu/data/afrk.html
or some shit like that.perl -pi -e 's/<script.*?</script>/blahblah/g' *.html
Otherwise, get a decent IDE like all other suggestions and follow their advice.Your post count means nothing.Comment
-
if the java script is different you will need some kind of script or proggie supporting reg expressionsComment
-
Comment
-
-
put all your files if the same directory then code a software that list every files of the directory, then code that for each file the source code is stored in a memory stream, find and delete what is not good, then write over the old file with the memory stream.
In delphi i can code that in 1 hour.Comment



Comment