delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/06/27/22:29:43

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
To: cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: "Max" <maxng AT webwizarddesign DOT com>
Newsgroups: gmane.os.cygwin
Subject: perl and problem with in-place edits (just deletes files) on Cygwin 1.3.10 on Win98
Date: Thu, 27 Jun 2002 22:27:29 -0400
Lines: 33
Message-ID: <afghkl$34n$1@main.gmane.org>
Reply-To: "Max" <maxng AT webwizarddesign DOT com>
NNTP-Posting-Host: sdn-ar-002vacharp186.dialsprint.net
Mime-Version: 1.0
X-Trace: main.gmane.org 1025231317 3223 168.191.213.226 (28 Jun 2002 02:28:37 GMT)
X-Complaints-To: usenet AT main DOT gmane DOT org
NNTP-Posting-Date: Fri, 28 Jun 2002 02:28:37 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

Hi,

Ran this command the other day in a directory with C files

perl -p -i -e 's/string1/string2/g' *c

Got a long list of

Can't do inplace edit on name.c: File exists.

At the end of it, all the .c files were deleted .. I assume this is a
symlink issue .. that perl is calling
some system file linking function that isn't implemented properly or
implemented at all?

Output from perl -v:

This is perl, v5.6.1 built for cygwin-multi

I know that with the Win32 port it will not allow you to do an inplace edit
without specifying a backup
extension after -i, e.g.

perl -p -i.bak -e 's/string1/string2/g' glob

I assumed that since the Cygwin perl didn't give this warning it would do
the right thing ;) ... I am very thankful for
shareware undelete software now!

Anybody know what isn't in place for this to work correctly?

Max




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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