Adriano Ferreira wrote:
> On 12/2/05, Chris Devers <[EMAIL PROTECTED]> wrote:
>>My understanding is that the Python idiom is to avoid putting the full
>>path, in favor of something like
>>
>>    #!/usr/bin/env python
>>    #!env python
>>
>>on grounds that Python may not be quite as common, but you could depend
>>on the `env` command being available, so as long as `python` was in the
>>$PATH somewhere, invoking it this way should work. That makes sense, but
>>now that I think about it I'm not clear why they don't just use
>>
>>    #!python
>>
>>which seems like it should amount to the same thing.
> 
> Just for the record, I found with the help of the people at
> python-list@python.org that the difference about "#!/usr/bin/env
> python", "#!env python" and "#!python" is that not every shell looks
> up the shebang executable in the path,

That is because it is not the shell's job.  It is the operating system that
reads the first line and determines what to run.  How do you think that init
can run shell scripts?  That is why you have to use an absolute path in the
script, because the OS does not have a $PATH available.



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to