This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [1.7] bash UNC path bug?
- From: Eric Blake <ericblake at comcast dot net>
- To: cygwin at cygwin dot com
- Date: Thu, 30 Jul 2009 18:36:19 +0000 (UTC)
- Subject: Re: [1.7] bash UNC path bug?
> > 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