This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: Executing a script that needs DOS path
- From: "Scott Prive" <Scott dot Prive at storigen dot com>
- To: "Ivan Dobrianov" <ivan at dobrianov dot net>,<cygwin at cygwin dot com>
- Date: Thu, 10 Oct 2002 19:17:55 -0400
- Subject: RE: Executing a script that needs DOS path
Have you looked for "cygpath" in the archives (also `man cygpath`).
cygpath will return a "converted" path. Be sure to use single quotes OR properly escape your input string or you will not get the expected result.
I haven't used this myself, which is why I avoid a direct answer, but I've seen the question enough on the list and a cursory glance at the manpage says you want this...
-Scott
> -----Original Message-----
> From: Ivan Dobrianov [mailto:ivan@dobrianov.net]
> Sent: Thursday, October 10, 2002 2:37 PM
> To: cygwin@cygwin.com
> Subject: Executing a script that needs DOS path
>
>
> Sorry if this has been answered a hundred times, but could not find
> anything the FAQ, doc, or archives.
>
> THE PROBLEM:
>
> o Say I have some intrepreter xxx.exe, that expects to get
> started like
> this
> xxx c:\home\my_script.xxx <arg_1> <arg_2> ...
>
> o I want to automate this process the usual way, by adding
> this to the
> begining of the script:
>
> #!/c/bin/xxx
> ...
>
> hoping to be able to say:
> my_script.xxx <arg_1> <arg_2>
>
> o *** This fails, because cygwin [or bash] passes the unix path
> /c/home/my_script.xxx to xxx.exe which it cannot interpret.
>
> Is there a solution to this OTHER THAN using a proxy shell
> that would do
> the unix-to-dos translation? The reason I don't like this solution is
> that the shell will glob and eat quotes, making it very hard
> to process
> filenames with spaces.
>
> Thanks for any hints!
>
>
> --
> 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/
>
>
--
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/