This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Pass windows-style paths to the interpreter from the shebang line ?
- From: Timothy Madden <terminatorul at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 09 Nov 2011 15:39:29 +0200
- Subject: Pass windows-style paths to the interpreter from the shebang line ?
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