From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7577 invoked by alias); 9 Nov 2011 13:40:02 -0000 Received: (qmail 7552 invoked by uid 22791); 9 Nov 2011 13:40:01 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Nov 2011 13:39:46 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RO8NQ-0001f9-Sr for cygwin@cygwin.com; Wed, 09 Nov 2011 14:39:40 +0100 Received: from 81-181-249-254.fo.opensys.ro ([81.181.249.254]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Nov 2011 14:39:40 +0100 Received: from terminatorul by 81-181-249-254.fo.opensys.ro with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Nov 2011 14:39:40 +0100 To: cygwin@cygwin.com From: Timothy Madden Subject: Pass windows-style paths to the interpreter from the shebang line ? Date: Wed, 09 Nov 2011 13:40:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-11/txt/msg00139.txt.bz2 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