Re: Mass Replace

Jeff Kinz <[email protected]>
Newsgroups gmane.linux.redhat.release.enigma
Message-ID <[email protected]>
On Tue, Jun 03, 2003 at 05:58:25AM +0100, c.n naveen wrote:
> > From: "Faisal" <[email protected]>
> > Like I need to change company name from over 200
> > files htmls with new
> > name how can I do that.
> > 
>     for file in $*
>     do
> 
>        sed s/compname/newcompname/g $file >          
>                                  /tmp/temp.html
>        mv /tmp/temp.html $file
>    
>     done 

Much easier to use the "replace" command.

example:     replace Old_String  New_String   *.html 


All done.



-- 
Jeff Kinz, Open-PC, Emergent Research,  Hudson, MA.  [email protected]
copyright 2003.  Use is restricted. Any use is an 
acceptance of the offer at http://www.kinz.org/policy.html.
Don't forget to change your password often.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.