Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2009 12:12:38 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        Glen Barber <glen.j.barber@gmail.com>
Cc:        stable@freebsd.org
Subject:   Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a 	function.)
Message-ID:  <4A64C1A6.3080607@FreeBSD.org>
In-Reply-To: <4ad871310907191717g1ed90be7y92250f2addc38d43@mail.gmail.com>
References:  <4ad871310907191717g1ed90be7y92250f2addc38d43@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A64C1A6.3080607>