Re: plug] find/replace text

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: R P Herrold
Date:  
To: plug-discuss
Old-Topics: find/replace text
Subject: Re: plug] find/replace text
On Fri, 27 May 2005, steve Phariss wrote:

> I am trying to replace all instances of .html to .php in multiple files
> (same directory) I have tried a few of the sed command scripts I found on
> the web, but they do not seem to be working.


for i in `find _start_directory_ type f -a print`; do
     cp $i $i.backup
     sed -e 's/\.html/\.php/g' < $i.backup > $i
done


should work, and yet leave a safety pristine copy behind

- Russ Herrold
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss