delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/02/18/16:47:31

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 18 Feb 2004 16:46:33 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
cc: dAniel hAhler <cygwin AT thequod DOT de>
Subject: Re: search and replace tool (Attn: gawk maintainer)
In-Reply-To: <6.0.1.1.0.20040218151724.0398d488@127.0.0.1>
Message-ID: <Pine.GSO.4.56.0402181635470.1284@slinky.cs.nyu.edu>
References: <291592011 DOT 20040218205953 AT thequod DOT de> <6 DOT 0 DOT 1 DOT 1 DOT 0 DOT 20040218151724 DOT 0398d488 AT 127 DOT 0 DOT 0 DOT 1>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

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.  As a result, it's off-topic for this
> list.  I will, however, point you in one direction that could help.  'sed'
> or 'awk' are good possibilities here.  Of course, you'd want to wrap
> these in a script that created a new file and then replaced the original
> with the result.  This same process could be used on any platform that
> supports these tools however so talking much about the details isn't really
> appropriate.  There's plenty of information on the net about these utilities
> if you're interested in finding out more about how they work.
>
> HTH,
> --
> Larry Hall

Larry, you missed 'perl'.  How could you? ;-)

FWIW, both perl and sed have the ability to edit files in-place (although
this functionality is somewhat buggy in sed, see, for example,
<http://cygwin.com/ml/cygwin/2003-11/msg00773.html>).

To make this more Cygwin-related, there is no man page for "awk" in
Cygwin.  There is one for "gawk".  Since /usr/bin/awk.exe is a symlink to
/usr/bin/gawk.exe, would it be possible to create a symlink to
/usr/share/man/man1/gawk.1 as /usr/share/man/man1/awk.1?  Corinna?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019