Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2009 14:25:07 -0400
From:      Glen Barber <glen.j.barber@gmail.com>
To:        Lowell Gilbert <freebsd-stable-local@be-well.ilk.org>
Cc:        stable@freebsd.org
Subject:   Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)
Message-ID:  <4ad871310907201125u42789ff9h57c74c26b0538c18@mail.gmail.com>
In-Reply-To: <44k523fdc4.fsf@be-well.ilk.org>
References:  <4ad871310907191717g1ed90be7y92250f2addc38d43@mail.gmail.com> <44tz17k46h.fsf@lowell-desk.lan> <4ad871310907200702q6d13a44bqaeb2242d65866b16@mail.gmail.com> <44k523fdc4.fsf@be-well.ilk.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 20, 2009 at 1:56 PM, Lowell
Gilbert<freebsd-stable-local@be-well.ilk.org> wrote:
> Glen Barber <glen.j.barber@gmail.com> writes:
>>> The shell specified in the "#!" first line is only consulted if you run
>>> it as "./foo.sh". =A0Otherwise, it's input to the shell that you starte=
d,
>>> and the line is only a comment.
>>>
>>
>> I suppose that makes sense, but what if the script location is in the
>> user's $PATH?
>
> That would be the same as "./foo.sh".
> The distinction is between whether the file is treated as an executable
> or as input to a script. =A0You might find the manual page for execve(2)
> useful for more detail on how the former case is handled.
>
>
>

Aha!  Yes, I will have a look.  Thanks for the point in the right direction=
.

--=20
Glen Barber



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