From owner-freebsd-stable@FreeBSD.ORG Mon Jul 20 19:39:22 2009 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEBCE106566B for ; Mon, 20 Jul 2009 19:39:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 3C21F8FC08 for ; Mon, 20 Jul 2009 19:39:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 12326 invoked by uid 399); 20 Jul 2009 19:12:40 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 20 Jul 2009 19:12:40 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A64C1A6.3080607@FreeBSD.org> Date: Mon, 20 Jul 2009 12:12:38 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.22 (X11/20090625) MIME-Version: 1.0 To: Glen Barber References: <4ad871310907191717g1ed90be7y92250f2addc38d43@mail.gmail.com> In-Reply-To: <4ad871310907191717g1ed90be7y92250f2addc38d43@mail.gmail.com> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: stable@freebsd.org Subject: Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2009 19:39:23 -0000 Glen Barber wrote: > Possibly off-topic... It's very off topic for -stable. If you want to follow up on this, please do so in -hackers. > I meant to say in the last line: "'#!/bin/sh' would override the 'zsh' shell." > > Can someone enlighten me if I am wrong about this? It's trivial to create an example to test it yourself, don't ask when you can do. :) #!/bin/foo echo yes $ ./foo bash: ./foo: /bin/foo: bad interpreter: No such file or directory $ sh foo yes $ bash foo yes Now it's your turn. :) Doug -- This .signature sanitized for your protection