Re: plug] find/replace text

Kezdőlap
Csatolmányok:
Üzenet email-ben
+ (text/plain)
Üzenet törlése
Válasz az üzenetre
Szerző: R P Herrold
Dátum:  
Címzett: plug-discuss
Régi témák: find/replace text
Tárgy: 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