Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Originating-IP: [208.54.143.1] X-Originating-Email: [rkitover AT hotmail DOT com] X-Sender: rkitover AT hotmail DOT com From: "Rafael Kitover" To: "'cygwin-list'" Subject: RE: search and replace tool Date: Wed, 18 Feb 2004 12:13:38 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <291592011.20040218205953@thequod.de> Message-ID: X-OriginalArrivalTime: 18 Feb 2004 20:13:42.0171 (UTC) FILETIME=[B42B76B0:01C3F65B] 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 perlretut). If you need to do multiline replaces, you should probably write a script, or use some other solution. -- Rafael >-----Original Message----- >From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of >dAniel hAhler >Sent: Wednesday, February 18, 2004 12:00 PM >To: cygwin-list >Subject: search and replace tool > >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.. :) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/