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: <4A7A151B.4040600@gmail.com> Date: Thu, 06 Aug 2009 00:26:19 +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: CygWin backslash variable - stores dos based filename with path References: <4a79e7dd DOT 21d7720a DOT 78e4 DOT 60fc AT mx DOT google DOT com> In-Reply-To: <4a79e7dd.21d7720a.78e4.60fc@mx.google.com> 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 Rajesh George CetusTech wrote: > I am very new to CygWin, but having experience in Solaris, RedHat linux, > Oracle linux and Microsoft Windows. > > My issue: Am running one batch job from Windows, which needs to execute one > .sh file using CygWin and the batch file passes the filename with path > (windows/DOS style) to the .sh shell. > Shell of cygwin removing all the '\' s and made the file path as a different > word. > > For example, "e:\test\testcomn\util\jre\1.1.8\bin\jre.exe" become > "e:testtestcomnutiljre1.1.8binjre.exe" and I got "command not found" error. > In this case, am not allowed to edit the any bat/sh files. But I can modify > the CygWin settings. > > Please advice, How to make CygWin to convert automatically file path from > "e:\test\testcomn\util\jre\1.1.8\bin\jre.exe" to > "e:test/testcomn/util/jre/1.1.8/bin/jre.exe" Cygwin doesn't have any built-in feature such as you wish, because it tries to impersonate Linux and Linux doesn't do that. Cygwin is like linux: backslash is an escape character in the shell, not a path separator. What you want to do wouldn't work on Linux, and the whole point of Cygwin is to imitate Linux on Windows. So, why are you using Cygwin at all if you just want to run Windows programs and that's difficult under Cygwin because of the differences in file path syntax? If you really aren't allowed to change anything at all, then obviously nothing will happen differently. Or can you just use forward slashes, which will work on both Windows and Cygwin? There is also the cygpath command, which converts between Cygwin POSIX and Windows DOS-style paths, and you might be able to use that, but you'd have to be allowed to change either the .bat file or the .sh script. Explain your situation in a bit more detail and we might be able to figure a workaround for you. 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