Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-03-2007, 12:23 PM   #1
teomaxxx
Confirmed User
 
Join Date: May 2003
Posts: 2,734
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 ?
teomaxxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 12:29 PM   #2
Andiz
Confirmed User
 
Andiz's Avatar
 
Join Date: Feb 2006
Posts: 2,594
Search and replace.

I bet you can find a fancy program online for that
Andiz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 12:29 PM   #3
KimJI
Confirmed User
 
Join Date: May 2007
Location: So fucking gone
Posts: 1,839
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
KimJI is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 01:09 PM   #4
teomaxxx
Confirmed User
 
Join Date: May 2003
Posts: 2,734
Quote:
Originally Posted by Andiz View Post
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.
teomaxxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 01:11 PM   #5
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
prob some awk/sed/regex ninja type stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 01:13 PM   #6
KimJI
Confirmed User
 
Join Date: May 2007
Location: So fucking gone
Posts: 1,839
Quote:
Originally Posted by teomaxxx View Post
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
KimJI is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 01:22 PM   #7
DamageX
Marketing & Strategy
 
DamageX's Avatar
 
Industry Role:
Join Date: Jun 2001
Location: Former nomad
Posts: 14,293
rm -Rf *
__________________
Whitehat is for chumps

If you don't do it, somebody else will - true story!
DamageX is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 01:57 PM   #8
testpie
Mostly retired
 
testpie's Avatar
 
Industry Role:
Join Date: Apr 2006
Location: UK
Posts: 3,231
Quote:
Originally Posted by DamageX View Post
rm -Rf *
__________________

Affiliates: DogFart ~ Domain parking: NameDrive ~ Traffic broker: Traffic Holder
testpie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 02:09 PM   #9
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
Quote:
Originally Posted by Fris View Post
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.
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 02:16 PM   #10
Mr Pheer
Retired
 
Mr Pheer's Avatar
 
Industry Role:
Join Date: Dec 2002
Posts: 21,264
Quote:
Originally Posted by DamageX View Post
rm -Rf *
you son of a bitch... how do i fix this?
__________________
2 lifeguards for Jessica
Mr Pheer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 02:17 PM   #11
Masterchief
Confirmed User
 
Join Date: Jun 2006
Posts: 530
get editplus, open all files and run an regex search and replace
Masterchief is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 02:20 PM   #12
DamageX
Marketing & Strategy
 
DamageX's Avatar
 
Industry Role:
Join Date: Jun 2001
Location: Former nomad
Posts: 14,293
Quote:
Originally Posted by Mr Pheer View Post
you son of a bitch... how do i fix this?
__________________
Whitehat is for chumps

If you don't do it, somebody else will - true story!
DamageX is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 02:25 PM   #13
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
Quote:
Originally Posted by Mr Pheer View Post
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.
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 02:29 PM   #14
u-Bob
there's no $$$ in porn
 
u-Bob's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq: 195./568.-230 (btw: not getting offline msgs)
Posts: 33,063
perl is your friend.
u-Bob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 03:06 PM   #15
BucksMania
Confirmed User
 
Industry Role:
Join Date: Oct 2005
Posts: 3,758
if the java script is different you will need some kind of script or proggie supporting reg expressions
BucksMania is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 03:23 PM   #16
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
i have a php program you could use to do this, ill see if i can find it
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 03:42 PM   #17
Vick!
Confirmed User
 
Industry Role:
Join Date: Nov 2005
Location: 20 00'24.00" N, 75 09'00.00 W
Posts: 6,882
del *.*

______
Vick! is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 03:47 PM   #18
munki
Do Fun Shit.
 
munki's Avatar
 
Industry Role:
Join Date: Dec 2004
Location: OC
Posts: 13,393
Quote:
Originally Posted by Mr Pheer View Post
you son of a bitch... how do i fix this?


__________________

I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde
munki is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 03:53 PM   #19
pornmasta
Too lazy to set a custom title
 
pornmasta's Avatar
 
Join Date: Jun 2006
Posts: 19,227
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.
pornmasta is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-03-2007, 03:55 PM   #20
tranza
ICQ: 197-556-237
 
Join Date: Jun 2003
Location: BRASIL !!!
Posts: 57,559
Quote:
Originally Posted by Mr Pheer View Post
you son of a bitch... how do i fix this?

Lololololol.... Are you for real??
__________________
I'm just a newbie.
tranza is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.