delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/10/19:18:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
content-class: urn:content-classes:message
Subject: RE: Executing a script that needs DOS path
MIME-Version: 1.0
Date: Thu, 10 Oct 2002 19:17:55 -0400
X-MIMEOLE: Produced By Microsoft Exchange V6.0.5762.3
Message-ID: <7BFCE5F1EF28D64198522688F5449D5AC1E2A9@xchangeserver2.storigen.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: "Scott Prive" <Scott DOT Prive AT storigen DOT com>
To: "Ivan Dobrianov" <ivan AT dobrianov DOT net>, <cygwin AT cygwin DOT com>
Note-from-DJ: This may be spam
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g9ANI7Y20458

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 AT dobrianov DOT net]
> Sent: Thursday, October 10, 2002 2:37 PM
> To: cygwin AT cygwin DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019