Re: Mercurial 0.4b vs git patchbomb benchmark

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 2 May 2005, Bill Davidsen wrote:
> > -#!/usr/bin/python
> > +#!/usr/bin/env python

> Could you explain why this is necessary or desirable? I looked at what 
> env does, and I am missing the point of duplicating bash normal 
> behaviour regarding definition of per-process environment entries.

It's not about environment.

It's about the fact that many people have things like python in
/usr/local/bin/python, because they compiled it themselves or similar.

Pretty much the only path you can _really_ depend on for #! stuff is 
/bin/sh.

Any system that doesn't have /bin/sh is so fucked up that it's not worth
worrying about. Anything else can be in /bin, /usr/bin or /usr/local/bin
(and sometimes other strange places).

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 "$@"

instead.
		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux