[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to add dir to path



Manon Metten(manon.metten@gmail.com) is reported to have said:
> Hi Wayne,
> 
> On 8/8/07, Wayne Topa <linuxone@intergate.com> wrote:
> 
<--<snip>-->

> 
> Executing . .bash_profile makes no difference. The new dir won't show
> up in another session, only if I open a new  bash window, but never in
> a new session.
> 
> The only thing concerning .bashrc in .bash_profile are these lines:
> 
> # include .bashrc if it exists
> if [ -f ~/.bashrc ]; then
>     . ~/.bashrc
> fi

My .bash_profile(s)/.bashrc(s) for root and user have grown over the 14 
years I have been running Debian.  Some entries are commented out but
I could not operate efficiently without most of them.  The prompts
shown below are an example of 1 entry in the .bash_profile.

--------------  PS1 Example
# Check which distribution is running
if [ "`grep -c -e "/dev/sda9       /" /etc/fstab`" = 1 ]; then
  DI="ETCH"
elif [ "`grep -c -e "/dev/sda5       /" /etc/fstab`" = 1 ]; then
  DI="TESTING"                                                                                                                                         14:56:02
else
  DI="SID"
fi
V_TERM=`tty`
box="dj"

export PS1="\[`setterm -foreground green`\]VT${V_TERM##/dev/tty} \
\u-$box-($DI):\w\\$\[`setterm -default`\] "
_______________ End Example

VT2 root-dj-(TESTING):~# wc -l .bash_profile
114 .bash_profile
VT2 root-dj-(TESTING):~# wc -l .bashrc
209 .bashrc

VT4 wtopa-dj-TESTING:~$ wc -l .bash_profile
105 .bash_profile
VT4 wtopa-dj-TESTING:~$ wc -l .bashrc
138 .bashrc

You have already found that ~/bin is a big help as well. My ~/bin is
rather large too.

VT1 root-dj-(TESTING):~# du -chs ~/bin
1.6M    /root/bin
1.6M    total

VT4 wtopa-dj-TESTING:~$ du -chs ~/bin
816K    /home/wtopa/bin
816K    total

Isn't Debian (Linux) fun!

Wayne

-- 
No matter how much data you add to your laptop, it will not get
heavier.
_______________________________________________________



Reply to: