Gossamer Forum
Home : General : Internet Technologies :

Search And Replace -- Recursive

Quote Reply
Search And Replace -- Recursive
This has been asked quite a few times.
I would recursively want to replace a string xxx-zzzzzzzz with yyy-wwwwwwww recursively in all files below a given directory 'directory'. The 'directory' has subdirectories too so it has to be recursive search and replace.

How to do it?

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================

Last edited by:

HyperTherm: Apr 16, 2005, 10:03 PM
Quote Reply
Re: [HyperTherm] Search And Replace -- Recursive In reply to
Have a look here:

http://www.gossamer-threads.com/...ch%20replace;#263442

----
Cheers,

Dan
Founder and CEO

LionsGate Creative
GoodPassRobot
Magelln
Quote Reply
Re: [dan] Search And Replace -- Recursive In reply to
Hi.

Thanks i had seen that and tried it.
Actually i have files within subdirectories of a directory.
so if i just go down to the directory and then do

grep -r -l 'stringtoreplace' it just gives nothing

if on the other hand i do

grep -r -l 'stringtoreplace' a*

it does give all the files within the directories starting with 'a'

if i go up one level

grep -r -l 'stringtoreplace' directory

it does list all the subdirectories/files within directory where 'stringtoreplace' exists.

So stuck at that

TIA

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [dan] Search And Replace -- Recursive In reply to
Thanks.
Could get it going... all done

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Search And Replace -- Recursive In reply to
Use UltraEdit!

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...