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

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 20, 2009 at 3:12 PM, Doug Barton<dougb@freebsd.org> wrote:
> 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. :)
>

Hi, Doug.

The test I was going to run was:
---------------------
#!/bin/sh
echo $SHELL
---------------------

which I would execute from $PATH and from 'sh/csh/zsh foo.sh', but I
haven't had much time to play around with it.  I plan on having time
later today after ${JOB}.


-- 
Glen Barber



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