Gentoo Archives: gentoo-dev

From: Alec Warner <antarus@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] /{"", usr/}bin path changed. What is the right solution for scripts?
Date: Sun, 01 Apr 2007 15:50:48
Message-Id: 39875.67.180.39.52.1175442417.squirrel@webmail.scriptkitty.com
In Reply to: Re: [gentoo-dev] /{"",usr/}bin path changed. What is the right solution for scripts? by Ciaran McCreesh
1 > On Sun, 01 Apr 2007 19:15:13 +0400
2 > Peter Volkov <pva@g.o> wrote:
3 >> On Sun, 2007-04-01 at 00:01 -0700, Alec Warner wrote:
4 >> > One idea that comes to mind is /usr/bin/env $bin
5 >>
6 >> And here we return to the problem that one day /usr/bin/env, could
7 >> become /bin/env... Or that /usr/ sometimes is not mounted during boot.
8
9 On Gentoo, env is in /bin and /usr/bin
10
11 /usr/bin/env is present on every unix system I've ever been on (I kind of
12 make it a habit to check) and probably a ton I've never used ;)
13
14 However using env really only makes sense in the
15
16 #!/usr/bin/env foo
17
18 case. Pretty much every other case you should be setting PATH to
19 something proper in your script.
20
21 --
22 gentoo-dev@g.o mailing list

Replies