delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/05/14/11:14:57

X-Spam-Check-By: sourceware.org
Date: Mon, 14 May 2007 17:14:30 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: Cygwin ML <cygwin AT cygwin DOT com>
Subject: Re: Problems with "sed -i"
Message-ID: <20070514151430.GK12259@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: Cygwin ML <cygwin AT cygwin DOT com>
References: <4628A2F9 DOT 2000200 AT bonhard DOT uklinux DOT net>
Mime-Version: 1.0
In-Reply-To: <4628A2F9.2000200@bonhard.uklinux.net>
User-Agent: Mutt/1.4.2.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

On Apr 20 12:24, fergus wrote:
> I'm having a few problems with sed -i (using the current sed v.4.1.5).
> 
> Unfortunately they only occur when used in a system() call from within a 
> program. That is to say
> 
> 	$ /bin/sed -i 's/expr1/expr2/g' {pathto}/filename
> 
> works fine, but
> 
> 	system("/bin/sed -i 's/expr1/expr2/g' {pathto}/filename")
> 	.. do stuff involving filename ..
> 
> invariably results in error messages of the style
> 
> 	/bin/sed: cannot rename {pathto}//sedEfWWjX: Permission denied

I can't reproduce this.  I tried with removing TMP, TEMP and TMPDIR
from my environment, but it "just works"(tm).  Looks like you have to
debug this a bit more on your own machine.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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