From owner-freebsd-questions@FreeBSD.ORG Mon Feb 14 18:45:48 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4AB7316A4CE for ; Mon, 14 Feb 2005 18:45:48 +0000 (GMT) Received: from simmts8-srv.bellnexxia.net (simmts8.bellnexxia.net [206.47.199.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CF6B43D54 for ; Mon, 14 Feb 2005 18:45:47 +0000 (GMT) (envelope-from techservices@onlinehobbyist.com) Received: from freebie2.perlnerd.com ([65.94.50.231]) by simmts8-srv.bellnexxia.netESMTP <20050214184546.TMBW1623.simmts8-srv.bellnexxia.net@freebie2.perlnerd.com>; Mon, 14 Feb 2005 13:45:46 -0500 Received: from [192.168.1.181] (monster [192.168.1.181]) by freebie2.perlnerd.com (8.13.1/8.13.1) with ESMTP id j1EIjdul005366; Mon, 14 Feb 2005 13:45:39 -0500 (EST) (envelope-from techservices@onlinehobbyist.com) Message-ID: <4210F1D9.4070405@onlinehobbyist.com> Date: Mon, 14 Feb 2005 13:45:45 -0500 From: Clint Gilders Organization: OnlineHobbyist.com, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en, fr-ca, de, en-us MIME-Version: 1.0 To: Gerard Samuel References: <4210E482.4060204@trini0.org> In-Reply-To: <4210E482.4060204@trini0.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions Subject: Re: Shabang executable path X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2005 18:45:48 -0000 Gerard Samuel wrote: > A bit off topic, but I figure someone in here, may be able to point > me in the right direction. > > !#/path/to/php > > Im wondering, if its possible for the /path/to/php can be made dynamic. > i.e. Have the file still look as if it is a shell script, but > the path to the executable is determined at run time, > to make it more portable. Seems to me you could use: #!/usr/bin/env php Much like people often recommend for perl scripts. -- Clint Gilders Director of Technology Services OnlineHobbyist.com, Inc.