Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <40355763.E01A2710@dessent.net>
Date: Thu, 19 Feb 2004 16:40:03 -0800
From: Brian Dessent <brian@dessent.net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: search and replace tool
References: <291592011.20040218205953@thequod.de> <6.0.1.1.0.20040218151724.0398d488@127.0.0.1> <40354B21.6040802@x-ray.at> <Pine.GSO.4.56.0402191929000.22216@slinky.cs.nyu.edu>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com

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).
> ...
> $ 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 Cygwin "-i" is really "-i.bak".  If
you try the above sequence on linux you don't get a .bak file and the
changes are truly done in-place.  I assume this relates to differences
in filesystem semantics.

Brian

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

