Prev: How to -- PPPoE with my ADSL Connection to connect internet with CentOS 5
Next: problem with aptitude upgrade or dist-upgrade
From: Sheep on 1 Sep 2007 03:30 I am trying to set the path in with adding lines in .bash_profile if [ -f ~/.bashrc ]; then . ~/.bashrc fi if [ -f ~/test.env ]; then ~/test.env fi PATH=$PATH:$HOME/bin export PATH Where test.env contains just a few of lines, export TOOLCHAIN_PATH=/1234567 export PATH=${TOOLCHAIN_PATH}/bin:$PATH echo PATH=${PATH} The last line in test.env is to make sure the desired path is added in every login. Actually, I got what I want when login as following text is shown PATH=/1234567/bin:/user/kerberos/bin:/user/local/bin:/bin:/usr/bin However, when the prompt comes up, I type "set" to further check, PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/shane/bin Originally, the system work fine with the setting. I don't what changes that sucks the system. Can anyone give me some clues on this problem?
From: Martin Klar on 1 Sep 2007 07:14 Sheep wrote: > I am trying to set the path in with adding lines in .bash_profile > > if [ -f ~/.bashrc ]; then > . ~/.bashrc > fi > if [ -f ~/test.env ]; then > ~/test.env > fi maybe a source ~/test.env fix your problem. "man bash": source filename [arguments] Read and execute commands from filename in the current shell environment .... HTH Martin
From: The Wizard of Oz on 1 Sep 2007 11:00 Sheep wrote: > I am trying to set the path in with adding lines in .bash_profile > > if [ -f ~/.bashrc ]; then > . ~/.bashrc > fi > if [ -f ~/test.env ]; then > ~/test.env > fi > PATH=$PATH:$HOME/bin > export PATH > > Where test.env contains just a few of lines, > > export TOOLCHAIN_PATH=/1234567 > export PATH=${TOOLCHAIN_PATH}/bin:$PATH > echo PATH=${PATH} > > The last line in test.env is to make sure the desired path is added in > every login. Actually, I got what I want when login as following text > is shown > PATH=/1234567/bin:/user/kerberos/bin:/user/local/bin:/bin:/usr/bin > > However, when the prompt comes up, I type "set" to further check, > PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/shane/bin > > Originally, the system work fine with the setting. I don't what > changes that sucks the system. > > Can anyone give me some clues on this problem? Here is a possible solution... # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin:/opt/schily/bin:/usr/local/lib:./ export PATH unset USERNAME
From: Daniel Ganek on 4 Sep 2007 11:34
Sheep wrote: > I am trying to set the path in with adding lines in .bash_profile > > if [ -f ~/.bashrc ]; then > . ~/.bashrc > fi > if [ -f ~/test.env ]; then > ~/test.env > fi > PATH=$PATH:$HOME/bin > export PATH > > Where test.env contains just a few of lines, > > export TOOLCHAIN_PATH=/1234567 > export PATH=${TOOLCHAIN_PATH}/bin:$PATH > echo PATH=${PATH} > > The last line in test.env is to make sure the desired path is added in > every login. Actually, I got what I want when login as following text > is shown > PATH=/1234567/bin:/user/kerberos/bin:/user/local/bin:/bin:/usr/bin > > However, when the prompt comes up, I type "set" to further check, > PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/shane/bin > > Originally, the system work fine with the setting. I don't what > changes that sucks the system. > > Can anyone give me some clues on this problem? You're executing ~/test.env not sourcing it. Change the line to . ~/test.env /dan |