Is it possible to locate where an environmental variable is exported from?
Is there a way to check? Is there an order of precidence as to what will have the final say on what an environmental variable will be?
|
Order is /etc/profile and/or /etc/bashrc (global for all users) then $HOME/.profile and/or $HOME/.bashrc.
Of course each of these can source in other files that set variables. I worked on a system once where tracing it down once where when I was all done I found 5 levels of sourcing occuring because the .profile sourced a script which in turned sourced another which in turn source another and so on. One way to figure it out might by adding a "-x" for debug to your .profile or .bashrc (you can try the /etc files but if anyone else logs in while you're testing they're going to be mighty confused by what they see). |
Ah yes...there was some sourcing in there...thankfully not too deep, but that takes care of that...thanks! :D
|
All times are GMT -5. The time now is 03:17 PM. |