On Thursday 12 May 2005 20:43, Adeodato Simó wrote:
> * Wesley J. Landaker [Thu, 12 May 2005 20:41:17 -0600]:
> > On Thursday 12 May 2005 20:18, Adeodato Simó wrote:
> > > Uhm, nice (one fork less), but then you can "quote arguments" (and
> > > "$*" won't help here).
> >
> > But "$@" will.
>
>
* Wesley J. Landaker [Thu, 12 May 2005 20:41:17 -0600]:
> On Thursday 12 May 2005 20:18, Adeodato Simó wrote:
> > Uhm, nice (one fork less), but then you can "quote arguments" (and
> > "$*" won't help here).
> But "$@" will.
No, sorry, it won't (I tested this stuff). At least in my system,
On Thursday 12 May 2005 20:18, Adeodato Simó wrote:
> * martin f krafft [Fri, 13 May 2005 04:10:48 +0200]:
> > also sprach Adeodato Simó <[EMAIL PROTECTED]> [2005.05.13.0338 +0200]:
> > > >8 /usr/bin/smartenv 8<-
> > > #! /bin/sh
> > >
> > > sh -c "$*"
> > >
* martin f krafft [Fri, 13 May 2005 04:10:48 +0200]:
> also sprach Adeodato Simó <[EMAIL PROTECTED]> [2005.05.13.0338 +0200]:
> > >8 /usr/bin/smartenv 8<-
> > #! /bin/sh
> > sh -c "$*"
> >
> #!/bin/sh
> exec $*
Uh
also sprach Adeodato Simó <[EMAIL PROTECTED]> [2005.05.13.0338 +0200]:
> >8 /usr/bin/smartenv 8<-
> #! /bin/sh
>
> sh -c "$*"
>
#!/bin/sh
exec $*
> Now go and make /usr/bin/smartenv standard. :P
it's just another
* martin f krafft [Wed, 11 May 2005 19:13:49 +0200]:
> also sprach Geert Stappers <[EMAIL PROTECTED]> [2005.05.11.1802 +0200]:
> > #!/usr/bin env - perl -w
> > so, the extra hyphen, the trick?
> No. shebang lines can only take one argument.
This works:
#! /usr/bin/smartenv perl -w
And
On 11-May-2005, Joey Hess wrote:
> Ben Finney wrote:
> > That would be a downside (and kills it for the primary use I had in
> > mind, '#!/usr/bin/env perl -w').
>
> Of course "#!/usr/bin/env perl\nuse warnings;" is equivilant.
Ah, I think I see; you're suggesting to use the following script
head
On 11-May-2005, Joey Hess wrote:
> Ben Finney wrote:
> > That would be a downside (and kills it for the primary use I had in
> > mind, '#!/usr/bin/env perl -w').
>
> Of course "#!/usr/bin/env perl\nuse warnings;" is equivilant.
That still seems to fall foul of the "shebang only recognises one
com
also sprach Geert Stappers <[EMAIL PROTECTED]> [2005.05.11.1802 +0200]:
> #!/usr/bin env - perl -w
>
> so, the extra hyphen, the trick?
No. shebang lines can only take one argument.
--
Please do not send copies of list mail to me; I read the list!
.''`. martin f. krafft <[EMAIL PROTECTE
Daniel Ruoso wrote on 11/05/2005 18:07:
> Em Ter, 2005-05-10 às 22:07, Ben Finney escreveu:
>
>>Yes, I've always been impressed with that trick (in direct proportion
>>to the hatred I had of '#!/usr/bin/perl' and '#!/usr/local/bin/perl'
>>wars).
>
> Considering we are in Debian, isn't alternative
Geert Stappers wrote on 11/05/2005 18:02:
> Does
>
> #!/usr/bin env - perl -w
>
> so, the extra hyphen, the trick?
This has the additional problem that "-" implies "-i", which starts with
an empty environment. And many script actually use environment variables
to control their behaviour.
cu,
s
On Wed, May 11, 2005 at 03:48:51PM +0200, martin f krafft wrote:
> also sprach Bas Zoetekouw <[EMAIL PROTECTED]> [2005.05.11.1528 +0200]:
> > > True. But before it will even be considered to make env standard,
> > > the parameter problem would have to be solved. perl -w and /bin/sh
> > > -e are jus
Em Ter, 2005-05-10 às 22:07, Ben Finney escreveu:
> Yes, I've always been impressed with that trick (in direct proportion
> to the hatred I had of '#!/usr/bin/perl' and '#!/usr/local/bin/perl'
> wars).
Considering we are in Debian, isn't alternatives the appropriate
solution for the different poss
Ben Finney wrote:
> That would be a downside (and kills it for the primary use I had in
> mind, '#!/usr/bin/env perl -w').
Of course "#!/usr/bin/env perl\nuse warnings;" is equivilant.
--
see shy jo
signature.asc
Description: Digital signature
also sprach Bas Zoetekouw <[EMAIL PROTECTED]> [2005.05.11.1528 +0200]:
> > True. But before it will even be considered to make env standard,
> > the parameter problem would have to be solved. perl -w and /bin/sh
> > -e are just necessary.
>
> Just put "use warnings;" or "set -e" in the script.
Ye
also sprach Roger Leigh <[EMAIL PROTECTED]> [2005.05.11.1526 +0200]:
> My solution, using perl scripts as an example, is to write
>
> [EMAIL PROTECTED]@ -w
>
> and use autoconf to generate the script for me, using
>
> AC_PATH_PROG([PERL], [perl])
This is not a solution for the problem being
Hi martin!
You wrote:
> True. But before it will even be considered to make env standard,
> the parameter problem would have to be solved. perl -w and /bin/sh
> -e are just necessary.
Just put "use warnings;" or "set -e" in the script.
--
Kind regards,
+
On Wed, May 11, 2005 at 11:04:06PM +1000, Ben Finney wrote:
> On 11-May-2005, martin f krafft wrote:
> > also sprach Ben Finney <[EMAIL PROTECTED]> [2005.05.11.0307 +0200]:
> > > To what extent should that be used? Is it reasonable to do it for
> > > *any* shebang line? '#!/usr/bin/env make'? '#!/u
also sprach Ben Finney <[EMAIL PROTECTED]> [2005.05.11.1504 +0200]:
> The context of the '#!/usr/bin/env python' trick extends beyond
> Debian though; the whole point is that a lookup will work in
> environments where the location of the executable *isn't* the
> standard one.
True. But before it w
On 11-May-2005, martin f krafft wrote:
> also sprach Ben Finney <[EMAIL PROTECTED]> [2005.05.11.0307 +0200]:
> > To what extent should that be used? Is it reasonable to do it for
> > *any* shebang line? '#!/usr/bin/env make'? '#!/usr/bin/env bash'?
> > Are there any downsides?
>
> Performance.
Th
also sprach Ben Finney <[EMAIL PROTECTED]> [2005.05.11.0307 +0200]:
> To what extent should that be used? Is it reasonable to do it for
> *any* shebang line? '#!/usr/bin/env make'? '#!/usr/bin/env bash'?
> Are there any downsides?
Performance. Debian standardises executable locations, so there is
Ben Finney <[EMAIL PROTECTED]> wrote:
> Is '/usr/bin/env' part of the POSIX spec? Is its behaviour with regard
> to command arguments defined? Where would I find out?
It is part of POSIX:
http://www.opengroup.org/onlinepubs/009695399/utilities/env.html
The problem is not with env, but with sh
On 11-May-2005, Robert Collins wrote:
> On Wed, 2005-05-11 at 11:07 +1000, Ben Finney wrote:
> > To what extent should that be used? Is it reasonable to do it for
> > *any* shebang line? '#!/usr/bin/env make'? '#!/usr/bin/env bash'?
> > Are there any downsides?
>
> AFAIK you can't pass parameters
Ben Finney <[EMAIL PROTECTED]> writes:
> On 11-May-2005, Goswin von Brederlow wrote:
>> Ben Finney <[EMAIL PROTECTED]> writes:
>> > The good thing about the (standard?) shebang convention -- using a
>> > first line of '#!/path/to/shell' in the executable file -- is that
>> > you can have executabl
On Wed, 2005-05-11 at 11:07 +1000, Ben Finney wrote:
>
> To what extent should that be used? Is it reasonable to do it for
> *any* shebang line? '#!/usr/bin/env make'? '#!/usr/bin/env bash'?
> Are there any downsides?
AFAIK you can't pass parameters to the program :
#!/bin/env python --debug
S
On 11-May-2005, Goswin von Brederlow wrote:
> Ben Finney <[EMAIL PROTECTED]> writes:
> > The good thing about the (standard?) shebang convention -- using a
> > first line of '#!/path/to/shell' in the executable file -- is that
> > you can have executable scripts shared even between different
> > Un
26 matches
Mail list logo