From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14134 invoked by alias); 13 Jul 2010 13:52:08 -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: 15183 Received: (qmail 19374 invoked from network); 13 Jul 2010 13:51:55 -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: <201007121737.21296.joke@seiken.de> Date: Tue, 13 Jul 2010 15:43:31 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1007130241570.5546@smasher> <201007121737.21296.joke@seiken.de> To: zsh-users@zsh.org X-Mailer: Apple Mail (2.1081) Le 12 juil. 2010 =E0 17:37, Joke de Buhr a =E9crit : > 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. It may as well be installed = under=20 > /usr/local/bin/env. Indeed, this kind of "too smart" stuff fails miserably on BeOS and = Haiku, which does not have /usr. Fran=E7ois.=