This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: behaviour of "for (( exp1; exp2; exp3 )); do COMMANDS; done"


Sam Edge <sam.edgeZZZ@lineone.net> writes:

> Harald Maier <maierh@myself.com> wrote:
>
>> > (OT) Does anyone know if any of the common shells, when they see
>> > "#!/bin/xxxx" at the front of a script, try a $PATH search for an
>> > "xxxx" executable if they can't find "/bin/xxxx"? This would seem like
>> > a good idea to me.
>> Some people are using the env program to use the PATH environment:
>> #! /usr/bin/env perl
>> BEGIN { $^W = 1 }
>
> Erm ... doesn't this just duplicate the problem? How can you guarantee
> that "env" is always in /usr/bin?
>
> It's also pretty inefficient, isn't it?

It gives you the freedom to start different interpreters with the same
script. E.g. perl-5.6 or perl-5.8. This might be interesting for
testing purposes. What are you looking for?

Harald


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]