GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How to mass delete javascript file from hundreds of pages? (https://gfy.com/showthread.php?t=739146)

teomaxxx 06-03-2007 12:23 PM

How to mass delete javascript file from hundreds of pages?
 
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 ?

Andiz 06-03-2007 12:29 PM

Search and replace.

I bet you can find a fancy program online for that

KimJI 06-03-2007 12:29 PM

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 start

teomaxxx 06-03-2007 01:09 PM

Quote:

Originally Posted by Andiz (Post 12536724)
Search and replace.

I bet you can find a fancy program online for that

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.

fris 06-03-2007 01:11 PM

prob some awk/sed/regex ninja type stuff

KimJI 06-03-2007 01:13 PM

Quote:

Originally Posted by teomaxxx (Post 12536864)
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 it

DamageX 06-03-2007 01:22 PM

rm -Rf *

testpie 06-03-2007 01:57 PM

Quote:

Originally Posted by DamageX (Post 12536913)
rm -Rf *

:1orglaugh

psili 06-03-2007 02:09 PM

Quote:

Originally Posted by Fris (Post 12536870)
prob some awk/sed/regex ninja type stuff

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.

Mr Pheer 06-03-2007 02:16 PM

Quote:

Originally Posted by DamageX (Post 12536913)
rm -Rf *

you son of a bitch... how do i fix this?

Masterchief 06-03-2007 02:17 PM

get editplus, open all files and run an regex search and replace

DamageX 06-03-2007 02:20 PM

Quote:

Originally Posted by Mr Pheer (Post 12537120)
you son of a bitch... how do i fix this?

:1orglaugh

psili 06-03-2007 02:25 PM

Quote:

Originally Posted by Mr Pheer (Post 12537120)
you son of a bitch... how do i fix this?

pressing "ctrl -z" doesn't work?

-----
Here's that perl thing:

http://kb.iu.edu/data/afrk.html

Quote:

perl -pi -e 's/<script.*?</script>/blahblah/g' *.html
or some shit like that.

Otherwise, get a decent IDE like all other suggestions and follow their advice.

u-Bob 06-03-2007 02:29 PM

perl is your friend.

BucksMania 06-03-2007 03:06 PM

if the java script is different you will need some kind of script or proggie supporting reg expressions

SmokeyTheBear 06-03-2007 03:23 PM

i have a php program you could use to do this, ill see if i can find it

Vick! 06-03-2007 03:42 PM

del *.*

______

munki 06-03-2007 03:47 PM

Quote:

Originally Posted by Mr Pheer (Post 12537120)
you son of a bitch... how do i fix this?

:Oh crap:Oh crap

:1orglaugh:1orglaugh

pornmasta 06-03-2007 03:53 PM

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.

tranza 06-03-2007 03:55 PM

Quote:

Originally Posted by Mr Pheer (Post 12537120)
you son of a bitch... how do i fix this?


Lololololol.... Are you for real??


All times are GMT -7. The time now is 05:34 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123