Re: how to search/replace text in mutliple files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 11, 2004 at 03:10:14PM -0400, Trevor Smith wrote:
> On February 11, 2004 09:33 am, Piero Calucci wrote:
> > btw if you are going to _replace_ text you should better look at sed or
> > perl one-liners
> 
> Dude, that was exactly the plan. But I couldn't get sed to *find* the text, 
> let alone replace it, so I concentrated on figuring out the regex (with grep) 
> and couldn't, so I emailed you. :-)
> 
> Now, how I am going to search/replace multi-line blocks of HTML in files using 
> sed? Good question. I'm afraid the power of sed has not been my friend (too 
> new to this).
> 
> -- 
>  Trevor Smith    |    trevor@xxxxxxxxxxxxxx 
> 
> 
> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
Trevor,

Try using find to locate the files and run sed on each file.

i.e.
 find . -exec "sed 's/oldtext/newtext/g'" ...

John V. Pope




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux