delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/03/16:30:34

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
Date: Wed, 3 Sep 2003 16:30:12 -0400
From: Christopher Faylor <cgf-rcm AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Strange cygpath/Perl 5.8 interaction?
Message-ID: <20030903203012.GA19080@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <732AC39DA54C1C4FBCBCC2F853D3AB816D16F9 AT athensgroup-pc9 DOT athensgroup DOT com>
Mime-Version: 1.0
In-Reply-To: <732AC39DA54C1C4FBCBCC2F853D3AB816D16F9@athensgroup-pc9.athensgroup.com>
User-Agent: Mutt/1.4.1i

On Wed, Sep 03, 2003 at 03:13:01PM -0500, Garrison, Jim wrote:
>In bash:
>
>  $ echo "\"`cygpath -w /c/temp`\""
>  "c:\temp"
>
>
>But in Perl:
>
>  $a = `cygpath -w /c/temp`;
>  print "|$a|";
>
>produces
>
>|c:\temp
>|
>
>I.e., Perl sees an extra \n at the end of the string. I looked at
>the source for cygpath and it doesn't seem to be adding a \n, so
>I suspect the problem is an unforeseen interaction between Cygwin
>and Perl's backtick operator.  Can anyone shed light on this topic?

I don't see anything unforeseen about the above behavior.  Substitute
/bin/echo for the cygpath above and you'll see the same behavior on
UNIX.

cgf

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