www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.2 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4EBB9D74.1030108@tlinx.org> |
Date: | Thu, 10 Nov 2011 01:46:28 -0800 |
From: | Linda Walsh <cygwin AT tlinx DOT org> |
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 AT cygwin DOT com |
Subject: | Re: Pass windows-style paths to the interpreter from the shebang line ? |
References: | <j9dvqh$u92$1 AT dough DOT gmane DOT org> <454021696 DOT 20111110052723 AT mtu-net DOT ru> |
In-Reply-To: | <454021696.20111110052723@mtu-net.ru> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |