This is the mail archive of the cygwin@sourceware.cygnus.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]

d:/foo to //d/foo to d:\foo to d:/foo


I know this is a FAQ, but I'm having trouble combining everything I've
read about this into a concise statement.

I have a bash script that references the HOME variable, which in DOS
is set to "d:/dmk".  In the script, I want to pass something like
"$HOME/subdir" to a non-cygwin program.

It appears that I have to emit the following each time I want
something like this:

echo $(cygpath -w $HOME | sed -e 's,\\,/,g')

If I just use "$(cygpath -w $HOME)", it produces "d:\dmk", which bash
processes and removes the "\".

Is there an easier way to do this, or do I just have to write the
script "dospathinbash" (which would do the filter described here) for
whenever I need to do this (which is quite often)?  A shell function
would probably better than a script.

-- 
===============================================================================
David M. Karr     ; dkarr@tcsi.com  ; w:(425)487-8312 ; TCSI & Best Consulting
Software Engineer ; Unix/Java/C++/X ; BrainBench CJ12P (6/12/2000)


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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