Thread (5 messages) 5 messages, 4 authors, 2005-05-04

Re: Mercurial 0.4b vs git patchbomb benchmark

From: Bill Davidsen <hidden>
Date: 2005-05-03 16:29:16
Also in: lkml

Matt Mackall wrote:
On Tue, May 03, 2005 at 03:16:26AM +0200, Bodo Eggert [off-list ref] wrote:
quoted
Linus Torvalds [off-list ref] wrote:
quoted
On Mon, 2 May 2005, Ryan Anderson wrote:
quoted
On Mon, May 02, 2005 at 09:31:06AM -0700, Linus Torvalds wrote:
quoted
quoted
quoted
That said, I think the /usr/bin/env trick is stupid too. It may be more
portable for various Linux distributions, but if you want _true_
portability, you use /bin/sh, and you do something like

#!/bin/sh
exec perl perlscript.pl "$@"
if 0;
exec may fail.

#!/bin/sh
exec perl -x $0 ${1+"$@"} || exit 127
#!perl

quoted
quoted
You don't really want Perl to get itself into an exec loop.
This would _not_ be "perlscript.pl" itself. This is the shell-script, and
it's not called ".pl".
In this thread, it originally was.

In this thread, it was originally a Python script. In particular, one
aimed at managing the Linux kernel source. I'm going to use
/usr/bin/env, systems where that doesn't exist can edit the source.
On the theory that my first post got lost, why use /usr/bin/env at all, 
when bash already does that substitution? To support people who use 
other shells?

ie.:
    FOO=xx perl -e '$a=$ENV{FOO}; print "$a\n"'
-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help