Linux.com

more man page trouble

Link to this post 03 Jun 09

woboyle wrote:

[b]CCC wrote:[/b]
[quote]Now if you try [code]export PATH="$PATH:/opt/gnome/bin"[/code] and then [code]echo $PATH[/code] again, you'll see that the PATH environment variable now has ":/opt/gnome/bin" stuck on the end, but is otherwise unchanged. (The colon is there to separate directories).

DON'T do this:
export PATH="$PATH:/opt/gnome/bin"
as environment variables can get confused depending upon the following character (a colon in this case). It is better to use
export PATH="${PATH}:/opt/gnome/bin"
Using $PATH by itself is not recommended. Using ${PATH} is as there is no ambiguity - the terminating curly-brace is definitive.[/quote]

My apologies. You are, of course, perfectly correct; the {}s are better practice.

Link to this post 19 Aug 09

echo " export PATH='$PATH:/opt/gnome/bin' " >> ~/.bashrc && su - `whoami`

thats it.

Link to this post 19 Aug 09

? is right. It would appear you are having him switch users to himself to source in the new PATH.

the quicker and easier way to refresh your terminal is to just execute the command:

source .bashrc

Although you have to be in your home directory for that to work. Otherwise you have to put in the full path.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board