Environment variables

Robert Holtzman holtzm at cox.net
Wed May 28 18:02:03 UTC 2008


On Wed, 28 May 2008, Nils Kassube wrote:

> Robert Holtzman wrote:
>> I'm not sure I see the logic in having the PATH and LANG variables in
>> /etc/environment and the HISTCONTROL, PS1, PROMPT_COMMAND, among
>> others, in ~./.bashrc.
>
> Actually it is in "~/.bashrc" where "~/" is expanded by the shell
> as "$HOME/" while ~./.bashrc would not be expanded. Yes, I know that's
> pedantic, but so are computers :)
>
> The variables PATH and LANG are known by all shells while HISTCONTROL, PS1
> and PROMPT_COMMAND are specific to bash. Therefore you could put the last
> ones in /etc/environment but they would be ignored for any shell except
> bash. And to be pedantic again, there may be other shells which know
> these variables as well. Anyway, it only makes sense to use those
> variables known to the shell in use.

Thanks fore the enlightenment.

-- 
Bob Holtzman
"If you think you're getting free lunch,
  check the price of the beer"




More information about the ubuntu-users mailing list