X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4A6EDBC7.3050505@gmail.com> Date: Tue, 28 Jul 2009 12:06:47 +0100 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [1.7] bash UNC path bug? References: <4A6EBFE9 DOT 7080007 AT shaddybaddah DOT name> In-Reply-To: <4A6EBFE9.7080007@shaddybaddah.name> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Shaddy Baddah wrote: > Hi, > > bash... maybe cygpath, seems to be doing something weird: > > $ cygpath -u '\\someuncpath\someshare' > //someuncpath/someshare > $ echo `cygpath -u '\\someuncpath\someshare'` > /cygdrive/c/someuncpath/someshare > $ # what's going on here Dunno, but this sheds a little light into it: > $ set -x > > $ echo `cygpath -u '\\someuncpath\someshare'` > ++ cygpath -u '\someuncpath\someshare' > + echo /win/f/someuncpath/someshare > /win/f/someuncpath/someshare > > $ echo `echo '\\'` > ++ echo '\' > + echo '\' > \ > > $ How odd. Something stripped a level of escaping even though it's inside single quotes. It's not cygpath, so it's probably bash. It may be by design for all I know, something to do with being in back-ticks; I haven't RTFMd yet. You can work around it by doubling up the backslashes: $ echo `cygpath -u '\\\\someuncpath\\someshare'` //someuncpath/someshare cheers, DaveK -- 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