RE: search and replace tool

2004-02-18 Thread Rafael Kitover
Not really cygwin specific, you can do something like: perl -pi -e 's/old text/new text/' `find /where -name '*.txt'` note those are backticks surrounding the find. Use -pi.bak to make backup files in case you screw up. You will of course need to know how to use regular expressions (see man perl

Re: search and replace tool

2004-02-18 Thread Larry Hall
At 02:59 PM 2/18/2004, dAniel hAhler you wrote: >Hello cygwin-list, > >I'm looking for a search and replace tool to replace a text portion in >a bunch (3500+) of files. > >That should be an easy one.. :) > > This isn't really Cywgin-specific. As a result, it's off-topic for this list. I will,

Re: search and replace tool

2004-02-18 Thread Yitzchak Scott-Thoennes
On Wed, Feb 18, 2004 at 12:13:38PM -0800, Rafael Kitover wrote: > Not really cygwin specific, you can do something like: > > perl -pi -e 's/old text/new text/' `find /where -name '*.txt'` > > note those are backticks surrounding the find. > > Use -pi.bak to make backup files in case you screw up

Re: search and replace tool

2004-02-18 Thread Brian Dessent
Rafael Kitover wrote: > > Not really cygwin specific, you can do something like: > > perl -pi -e 's/old text/new text/' `find /where -name '*.txt'` > > note those are backticks surrounding the find. > > Use -pi.bak to make backup files in case you screw up. You will of course need > to know how

Re: search and replace tool

2004-02-19 Thread Reini Urban
Larry Hall schrieb: At 02:59 PM 2/18/2004, dAniel hAhler you wrote: I'm looking for a search and replace tool to replace a text portion in a bunch (3500+) of files. That should be an easy one.. :) This isn't really Cywgin-specific. As a result, it's off-topic for this list. But fixing perl's lo

Re: search and replace tool

2004-02-19 Thread Igor Pechtchanski
On Fri, 20 Feb 2004, Reini Urban wrote: > Larry Hall schrieb: > > At 02:59 PM 2/18/2004, dAniel hAhler you wrote: > >>I'm looking for a search and replace tool to replace a text portion in > >>a bunch (3500+) of files. > >> > >>That should be an easy one.. :) > > > > This isn't really Cywgin-speci

Re: search and replace tool

2004-02-19 Thread Yitzchak Scott-Thoennes
On Fri, Feb 20, 2004 at 12:47:45AM +0100, Reini Urban <[EMAIL PROTECTED]> wrote: > Larry Hall schrieb: > >At 02:59 PM 2/18/2004, dAniel hAhler you wrote: > >>I'm looking for a search and replace tool to replace a text portion in > >>a bunch (3500+) of files. > >> > >>That should be an easy one.. :)

Re: search and replace tool

2004-02-19 Thread Brian Dessent
Igor Pechtchanski wrote: > On Fri, 20 Feb 2004, Reini Urban wrote: > > > But fixing perl's long-standing inability to do direct inline editing > > via perl -i would be cygwin specific. > > Anyone investigated this lately? > > What on Earth are you talking about? What inability? WFM (see below).

Re: search and replace tool

2004-02-19 Thread Igor Pechtchanski
On Thu, 19 Feb 2004, Brian Dessent wrote: > Igor Pechtchanski wrote: > > > On Fri, 20 Feb 2004, Reini Urban wrote: > > > > > But fixing perl's long-standing inability to do direct inline editing > > > via perl -i would be cygwin specific. > > > Anyone investigated this lately? > > > > What on Eart

Re: search and replace tool

2004-02-19 Thread Larry Hall
At 06:47 PM 2/19/2004, Reini Urban you wrote: >Larry Hall schrieb: >>At 02:59 PM 2/18/2004, dAniel hAhler you wrote: >>>I'm looking for a search and replace tool to replace a text portion in >>>a bunch (3500+) of files. >>> >>>That should be an easy one.. :) >>This isn't really Cywgin-specific. As

Re: search and replace tool

2004-02-19 Thread Egor Duda
On Thu, 19 Feb 2004, Brian Dessent wrote: What on Earth are you talking about? What inability? WFM (see below). ... $ perl -i -pe 's/blah/stuff/g' sometext $ ls sometext sometext.bak It didn't do the editing "inline", it created a new file and renamed the old one ".bak". In other words, on Cygw

Re: search and replace tool

2004-02-19 Thread Yitzchak Scott-Thoennes
On Fri, Feb 20, 2004 at 10:02:03AM +0300, Egor Duda wrote: > huh? what do you mean "in-place"? linux writes new file to new place, it > just deletes .bak file afterwards, unlike cygwin. > > [EMAIL PROTECTED]:~$ echo aaa >xxx > [EMAIL PROTECTED]:~$ ls -i xxx > 408096 xxx > [EMAIL PROTECTED]:~$ pe

Re: search and replace tool

2004-02-20 Thread Brian Dessent
Egor Duda wrote: > huh? what do you mean "in-place"? linux writes new file to new place, it > just deletes .bak file afterwards, unlike cygwin. Okay, it's not technically in-place. But perl expects to be able to do the following if you specify "-i": x = open("file"); unlink("file"); y = open("f

Re: search and replace tool

2004-02-20 Thread Egor Duda
Yitzchak Scott-Thoennes wrote: On Fri, Feb 20, 2004 at 10:02:03AM +0300, Egor Duda wrote: huh? what do you mean "in-place"? linux writes new file to new place, it just deletes .bak file afterwards, unlike cygwin. [EMAIL PROTECTED]:~$ echo aaa >xxx [EMAIL PROTECTED]:~$ ls -i xxx 408096 xxx [EMAIL

Re: search and replace tool (Attn: gawk maintainer)

2004-02-18 Thread Igor Pechtchanski
On Wed, 18 Feb 2004, Larry Hall wrote: > At 02:59 PM 2/18/2004, dAniel hAhler you wrote: > >Hello cygwin-list, > > > >I'm looking for a search and replace tool to replace a text portion in > >a bunch (3500+) of files. > > > >That should be an easy one.. :) > > This isn't really Cywgin-specific. A

Re: search and replace tool (Attn: gawk maintainer)

2004-02-18 Thread Larry Hall
At 04:46 PM 2/18/2004, Igor Pechtchanski you wrote: >On Wed, 18 Feb 2004, Larry Hall wrote: > >> At 02:59 PM 2/18/2004, dAniel hAhler you wrote: >> >Hello cygwin-list, >> > >> >I'm looking for a search and replace tool to replace a text portion in >> >a bunch (3500+) of files. >> > >> >That should