X-Spam-Check-By: sourceware.org Date: Mon, 14 May 2007 17:14:30 +0200 From: Corinna Vinschen To: Cygwin ML 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 References: <4628A2F9 DOT 2000200 AT bonhard DOT uklinux DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Precedence: bulk List-Id: List-Unsubscribe: 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 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/