From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26761 invoked by alias); 10 Nov 2011 09:46:52 -0000 Received: (qmail 26752 invoked by uid 22791); 10 Nov 2011 09:46:51 -0000 X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ishtar.tlinx.org (HELO Ishtar.sc.tlinx.org) (173.164.175.65) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Nov 2011 09:46:34 +0000 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.4/8.14.4/SuSE Linux 0.8) with ESMTP id pAA9kSbl031732 for ; Thu, 10 Nov 2011 01:46:31 -0800 Message-ID: <4EBB9D74.1030108@tlinx.org> Date: Thu, 10 Nov 2011 09:46:00 -0000 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Pass windows-style paths to the interpreter from the shebang line ? References: <454021696.20111110052723@mtu-net.ru> In-Reply-To: <454021696.20111110052723@mtu-net.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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/msg00175.txt.bz2 Andrey Repin wrote: > Greetings, Timothy Madden! > >> 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. > > Dearly use Windows native version of PHP > > And here's a simple command file to register your PHP as script interpreter > for both simple execution and windows scripting host jobs. > > @echo off > if "!%~dpnx1" == "!" (echo Usage: %~dp0 path_to_php-cli.exe && exit) > if not exist "%~dpnx1" (echo Invalid path to PHP interpreter && exit) > ftype PHPScript="%~dpnx1" -f "%%1" -- %%* > assoc .php=PHPScript > regsvr32 "%~dp1\php5activescript.dll" ---- So when he types in a script name at the Cygwin command line is there something in bash that reads Windows file-associations and auto opens them ?? Guess I haven't seen that 'extension'... -- 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