[wplug] replacing text within full website

Chris vze2f6h6 at verizon.net
Fri Jan 9 10:20:09 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kevin,

I used perl -pi.tmp -e 's/kingpin/www.foo.bar/g;' * yesterday and worked
as expected.
Thanks James.

Chris Romano


> -----Original Message-----
> From: wplug-admin at wplug.org [mailto:wplug-admin at wplug.org] On 
> Behalf Of Gentgeen
> Sent: Wednesday, January 07, 2004 10:15 PM
> To: wplug at wplug.org
> Subject: Re: [wplug] replacing text within full website
> 
> 
> Just a quick thank you to everyone who replied. Since I 
> haven't moved the server yet, I haven't tried any of your 
> perls of wisedom, but they look like they will do the trick.  
> I'm gonna try some of them this weekend on a mocked-up 
> directory structure just to give it a shot.
> 
> Thank again. 
> 
> 
> On Mon, 5 Jan 2004 22:39:25 -0500
> Gentgeen <gentgeen at linuxmail.org> wrote:
> 
> > First for the background info --
> > 
> > I have been working on a new website for the school that I teach at.
> > The work has been done on a headless machine named KINGPIN within my
> > home network.  KINGPIN has 2 nics, one set to get its 
> address via a DHCP
> > and the other has a static IP for my home network.  KINGPIN 
> is a little
> > machine, 120MHZ, 64MB RAM - not exactly a production server.  I'm
> > getting ready to take it into work and set it up internally (not for
> > production yet, just local access) so other teachers and 
> admin can have
> > a look, help proof-read, offer suggestions, etc.  
> > 
> > Now for the questions --
> > 
> > 1)  I'm thinking that I can take it in, plug the ethernet 
> cable into 
> > the nic setup for DHCP, get the IP from the school network, 
> and be off 
> > and running serving the webpages.  Does anyone see any 
> problems with 
> > that? Will I need to change any setting?  Should I turn on/off any 
> > particular services?  I really don't want to cause any 
> problems with 
> > the school network.  The sys-admin and I are friend, I want 
> to keep it 
> > that way.
> > :-)
> > 
> > 2)  When I do move it to production, I will need to change 
> any of the 
> > links on the webpages from "http://kingpin/" to 
"http://www.foo.bar"  
> I tried my best to keep them to a minimum, but a few cgi scripts need 
> full URL links.  the website consists of the servers root directory
> (/var/www/html/) and 5 sub-directories.  Spread throughout are about 
> 15-20 links that would need changed.  Of course I could go though and 
> check every page, then change them by hand with a little help from 
> 'bluefish' and 'find...replace' action.  But I was wondering if anyone 
> knew of an easier way.  My guess is some kind of script with using 
> 'grep'.  My script writing skills reflect my DOS BATCH file days, and 
> I have not had the easiest time learning to master grep, so I would 
> appreciate any help you can give me.
> 
> Once things go public, I'll be sure to give you all credit, and the 
> URL so you can see the work.
> 
> Thanks for the help,
> Kevin
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
_______________________________________________
wplug mailing list
wplug at wplug.org
http://www.wplug.org/mailman/listinfo/wplug

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBP/7GqQvHK4/UMrUIEQJUfgCeNDivpaHB4PM4yOcTzNIoef41BIUAn3md
5SDQRQxFPgVnUzPea54UrAHD
=X6VB
-----END PGP SIGNATURE-----




More information about the wplug mailing list