Handling Windows-style filenames (ie. '/' vs. '\')

Masterson, Dave dmasters@rational.com
Thu Oct 5 11:14:00 GMT 2000


I work in a ClearCase environment on Windows-NT.  I've installed Cygwin and
I'd like to use it more for my work.  My problem is that NT-ClearCase
assumes Windows-style filenames are passed to its commands (ie. they use
'\').  The problem with this in Cygwin BASH is that a name like C:\Dir\File
becomes C:DirFile after BASH touches it.  I can use the Cygpath command to
convert from UNIX filenames to Windows filenames, but this isn't very useful
in a shell script if the shell (BASH) is going to strip the backslashes.

Does cygpath have options to double (or triple?) the backslashes so that
they will get through the shell?  I think this option is necessary because
this will not work:

	cygpath -w /mnt/c/Dir/File | sed -e 's;\\;\\\\;' | xargs cleartool
describe

Any other tricks to handling this?

David Masterson
*	Rational Software
*	18880 Homestead Rd.
*	Cupertino, CA  95014
*	(408) 863-5150
*	dmasters@rational.com


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



More information about the Cygwin mailing list