This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygpath question


Robert,

I need to make a slight amendment to what I wrote before. Please see below.


At 22:33 2003-01-23, Randall R Schulz wrote:

...


   $ pwd
   /

   $ cdd C:\My Music
Here's what happens:

cd "`cygpath --unix "C:My Music"`"

I'm guessing your Cygwin root is the same as your C: drive root, so in this case you more or less incidentally get the result you want because your current directory was "/" (Cygwin) and "C:/" (Windows).
I should have tried an experiment. The current directory doesn't matter (nor, in that case, does the relationship between your Cygwin root and any particular Windows directory).

These two are identical:

cd "$(cygpath --unix "D:Documents and Settings")"

cd "$(cygpath --unix "D:\Documents and Settings")"


(I prefer the $( ... ) syntax to the `...` syntax.)


Randall Schulz

--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]