mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: June 14 2007,05:03 |
|
The space is deliberate only because the echo command automatically adds a space to its output. If you were to use echo's "-n" parameter (echo -n $LD_LIBRARY_PATH), or used some other method of grabbing the variable, you would not see that space. Your personal LD_LIBRARY_PATH variable, as well as that of any other DSL user who hasn't changed it, is empty (or possibly unset, although the difference between empty and unset is not important in this case). My earlier point about appending rather than replacing the variable, even if it is usually empty, is important because even though your variable is empty, someone else's may not be. If you're creating something that will be distributed to other users you shouldn't make assumptions about things like this, particularly when avoiding a potential problem is a simple task.
The dot at the end of PATH is not a full stop. It's a dot, which represents the present directory. What it means is that no matter what directory you are in, that directory becomes part of PATH so you can run commands in that directory without preceding the command with "./" (while you're in that directory). I'm not really sure why this was done, especially considering many people claim this is a potential security issue. But at least the dot is at the end of PATH, so commands in ./ do not override system commands.
Also, I see you ran the echo command as root. Each user has a unique environment, so root's LD_LIBRARY_PATH is not going to be the same as dsl's LD_LIBRARY_PATH. If the application is run by dsl, root's environment has no influence over it.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|