X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Date: Thu, 30 Jul 2009 18:36:19 +0000 (UTC) From: Eric Blake To: cygwin AT cygwin DOT com Message-ID: <533517069.6831891248978979849.JavaMail.root@sz0059a.emeryville.ca.mail.comcast.net> In-Reply-To: <20090728091647.GK18621@calimero.vinschen.de> Subject: Re: [1.7] bash UNC path bug? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 > > bash... maybe cygpath, seems to be doing something weird: Weird - yes. But buggy - no. > > > > $ cygpath -u '\\someuncpath\someshare' > > //someuncpath/someshare > > $ echo `cygpath -u '\\someuncpath\someshare'` > > /cygdrive/c/someuncpath/someshare > > $ # what's going on here > > $ echo "`cygpath -u '\\someuncpath\someshare'`" In a double-quoted `` context, \\ represents one \, and \s is undefined. Just because this is nested within a '' inside the `` does not make it a single-quoted context. The correct quoting would be: echo "`cygpath -u '\\\\someuncpath\\someshare'`" You are better off using $(), with saner quoting rules: echo "$(cygpath -u '\\someuncpath\someshare')" [disclaimer - I'm typing this on a machine without bash, so I was unable to test the above; hopefully I got it all correct] -- Eric Blake -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple