Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

Doug Barton dougb at FreeBSD.org
Mon Jul 20 19:39:23 UTC 2009


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



More information about the freebsd-stable mailing list