public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Pass windows-style paths to the interpreter from the shebang line ?
@ 2011-11-09 13:40 Timothy Madden
  2011-11-09 15:30 ` Corinna Vinschen
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Timothy Madden @ 2011-11-09 13:40 UTC (permalink / raw)
  To: cygwin

Hello

I would like to write a php script to run from my cygwin command line.
I have the php CLI executable (php.exe) in PATH and I use
	#!/bin/env php
as the first line of the .php script, and make it executable.

The problem is that bash will than invoke the Win32 native php.exe 
binary with the Cygwin-style path of my script as the argument,
and then php complains that it:

`Could not open input file: /home/Adrian/usr/local/bin/parseLog.php´

Which is normal for php.exe, as it does not understand cygwin paths.

I found no way around this problem. I would type `php /scriptname/´ 
myself but then the script name would no longer be searched on PATH and 
I would have to type 
'D:\Local\cygwin\home\Adrian\usr\local\bin\parseLog.php' as the script 
name at all times.

Is there a way around this ? Can cygwin detect the executable is not a 
cygwin application add pass in the right path name ?

Thank you,
Timothy Madden


--
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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-11-10 14:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-09 13:40 Pass windows-style paths to the interpreter from the shebang line ? Timothy Madden
2011-11-09 15:30 ` Corinna Vinschen
2011-11-09 15:46   ` Jeremy Bopp
2011-11-09 15:51     ` Corinna Vinschen
2011-11-10  1:14       ` PHP (was: Re: Pass windows-style paths to the interpreter from the shebang line ?) Yaakov (Cygwin/X)
2011-11-10 10:05         ` Corinna Vinschen
2011-11-09 21:16     ` Pass windows-style paths to the interpreter from the shebang line ? Timothy Madden
2011-11-09 21:20       ` Christopher Faylor
2011-11-09 15:51   ` Jeremy Bopp
2011-11-10  1:35     ` Andrey Repin
2011-11-09 16:27   ` Andrew DeFaria
2011-11-09 15:51 ` Marco Atzeri
2011-11-10  1:35 ` Andrey Repin
2011-11-10  9:46   ` Linda Walsh
2011-11-10 10:43   ` Timothy Madden
2011-11-10 14:20     ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).