Greenguy's Board


Go Back   Greenguy's Board > Newbie Questions
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2005-01-07, 06:39 PM   #6
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
if you have ssh, you can use rpl

I would suggest that you do something like

cp -Rp currentdir backupdir

then

rpl -R -x .html -x .php 'texttoreplace' 'replacewith' *

that will look at only .html and .php files an d replace the text. Of course, if it is multiline, you need to use -e and map the \n for newlines.

rpl is on most distributions. In debian, apt-get install rpl

its a python script and is pretty easy to use.

you can also add -s, which will run a dry run and tell you the number of occurrences and number of files that will be changed.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:20 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc