View previous topic :: View next topic |
Author |
Message |
tayak n00b
Joined: 20 Jul 2004 Posts: 1
|
Posted: Fri Jul 23, 2004 3:38 am Post subject: export command?? |
|
|
Hi,
I don't think the explanation of "export" command is good in following address
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1#book_part1_chap8
==============================================
Session Specific
Sometimes even stricter definitions are requested. You might want to be able to use binaries from a temporary directory you created without using the path to the binaries themselves or editing ~/.bashrc for those few moments you need it.
In this case, you can just define the PATH variable in your current session by using the export command. As long as you don't log out, the PATH variable will be using the temporary settings.
Code Listing 7: Defining a session-specific environment variable
# export PATH="${PATH}:/home/my_user/tmp/usr/bin"
==============================================
The export command is used for giving global meaning to the variables.
In this case, I just enter PATH="${PATH}:/home/my_user/tmp/usr/bin and still can run the binaries on /home/my_user/tmp/usr/bin. |
|
Back to top |
|
|
CompNerd Retired Dev
Joined: 16 Mar 2003 Posts: 311 Location: 127.0.0.1
|
Posted: Fri Jul 23, 2004 3:43 am Post subject: |
|
|
Actually, the guide is correct. The export command is session specific. However, because the command is put into ~/.bashrc, which is executed on every login (or instantiation of the bash shell i.e. starting a new terminal) it seems as if it is global.
CompNerd |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|