On Mon, Jul 20, 2009 at 1:56 PM, Lowell
Gilbert<freebsd-stable-lo...@be-well.ilk.org> wrote:
> Glen Barber <glen.j.bar...@gmail.com> writes:
>>> The shell specified in the "#!" first line is only consulted if you run
>>> it as "./foo.sh".  Otherwise, it's input to the shell that you started,
>>> 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.  You 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.

-- 
Glen Barber
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to