Gentoo Archives: gentoo-user

From: "Jesús Guerrero" <6thpink@×××××.es>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] $PATH
Date: Sun, 17 Dec 2006 23:03:21
Message-Id: 20061217235654.7e303cd4@pinkroom.pitufolandia.es
In Reply to: Re: [gentoo-user] $PATH by Boris Fersing
1 El Sun, 17 Dec 2006 23:41:23 +0100
2 "Boris Fersing" <kernelsensei@g.o> escribió:
3
4 > You don't need to export the variable...
5
6 You do, unless you plan to use that variable only instead of the
7 script, in this case, ~/.bashrc
8
9 And one thing you should consider is to use something to check if the
10 path has been already added. Otherwise you will end having a lot of
11 times that same path in your ${PATH} variable.
12
13 For example:
14
15 if [[ -n `echo $PATH | grep "/insert/your/path/here"` ]]
16 then
17 : # Fallback
18 else
19 PATH=/usr/local/bin:$PATH
20 export PATH
21 fi
22
23 -- Jesús Guerrero
24
25 --
26 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] $PATH "Jesús Guerrero" <6thpink@×××××.es>
Re: [gentoo-user] $PATH Alex Schuster <wonko@×××××××××.org>
Re: [gentoo-user] $PATH "Boyd Stephen Smith Jr." <bss03@××××××××××.net>