From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7686 invoked by alias); 20 Jul 2010 14:15:17 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15194 Received: (qmail 23251 invoked from network); 20 Jul 2010 14:15:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at free.fr does not designate permitted sender hosts) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: zsh portable script From: =?iso-8859-1?Q?Fran=E7ois_Revol?= In-Reply-To: Date: Tue, 20 Jul 2010 16:07:32 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <305645C3-6FF2-4D54-AC28-372D60283E07@free.fr> References: <1007130241570.5546@smasher> <201007121737.21296.joke@seiken.de> To: zsh-users@zsh.org X-Mailer: Apple Mail (2.1081) Le 20 juil. 2010 =E0 15:53, Thorsten Kampe a =E9crit : > * Joke de Buhr (Mon, 12 Jul 2010 17:37:19 +0200) >> On Monday 12 July 2010 16:46:22 Atom Smasher wrote: >>> on freebsd, zsh installs as /usr/local/bin/zsh. on linux (and most >>> other systems?) it installs as /usr/bin/zsh. >>>=20 >>> what's the best way to make zsh script portable between linux and >>> freebsd? >>>=20 >>> i could start the script with: >>> #!/usr/bin/env zsh >>>=20 >>> or i could specify that the script be executed as: >>> zsh script >>>=20 >>> is there a better way? >>=20 >> Using env doesn't solve the problem either. There is no guarantee the = "env"=20 >> program is installed under /usr/bin/env. >=20 > It does solve the problem that's why it's used in (shell) = scripting[1].=20 No it does not. BeOS never had any /usr. Haiku doesn't either. It's just used because people "saw" env being put there more often than = python or perl of whatever, but it doesn't mean they looked to all = possible places. It has just more chances of working but it's not a guarantee. > For Python for example it's the official way to specify the = interpreter.=20 Being official doesn't mean it's correct or works. > I don't think "Atom Smasher" need a "guarantee" - just a confirmation=20= > that it does indeed work. Again, it won't on Haiku and likely others. Fran=E7ois.=