Hi Wayne,

On 8/8/07, Wayne Topa <[EMAIL PROTECTED]> wrote:

Are you saying that you put the PATH in .bash_profile like
> PATH="./scripts:$PATH"
> export PATH
>
> And doing
> . . .bash_profile
>
> does not make it availible when it finishes?  If that is so, please
> post the contents of your .bash_profile.


That's exactly what I'm saying.

Here's what I did right after I logged in to KDE (as I'm using
~/bin for my scripts now, I did mkdir ~/XX for this example):

- open new bash window
- echo $PATH
  /home/manon/bin:/usr/local/bin:/usr/bin:/bin:/usr/games

- open second session
- echo $PATH
  /home/manon/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
- close second session

- nano .bash_profile
- entered PATH=~/XX:"${PATH}" at the end
- save & exit
- echo $PATH
  /home/manon/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
- . .bash_profile

/home/manon/XX:/home/manon/bin:/home/manon/bin:/usr/local/bin:/usr/bin:/bin:/usr/games

- open a second session
- echo $PATH
  /home/manon/bin:/usr/local/bin:/usr/bin:/bin:/usr/games

- open a second bash window
- echo $PATH
  /home/manon/XX:/home/manon/bin:/usr/local/bin:/usr/bin:/bin:/usr/games

- open a second session in the second window
- echo $PATH
  /home/manon/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
- close second window

- nano .bash_profile
- removed the line PATH=~/XX:"${PATH}"
- save & exit
- closed first window


Then I logged out from KDE and logged back in again.
I did exactly the same as written above and got exactly the same
output apart from now entering export PATH=~/XX:$PATH instead
of PATH=~/XX:"${PATH}" at the end of .bash_profile.

Strange, huh?

Did you also notice that after the first . .bash_profile I got
... /home/manon/bin:/home/manon/bin ...?
This ain't no typo, coz I copy/past'ed the output right from bash.


Here's my .bash_profile:

# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/login.defs
#umask 022

# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH}"
fi



And here's my .bashrc:

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# If this is an xterm set the title to user:dir
case "$TERM" in
xterm*|rxvt*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}: ${PWD/$HOME/~}\007"'
    ;;
*)
    ;;
esac

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

# --------

PS1='M> '

alias ll='ls -l --color=auto'
alias la='ls -a --color=auto'
alias al='ls -al --color=auto'
alias m0='mount /media/cdrom0'
alias m1='mount /media/cdrom1'
alias um0='umount /media/cdrom0'
alias um1='umount /media/cdrom1'
alias x='exit'
alias +='clear'


Greetings, Manon.



"Confusing world", said the spider, and returned to her web :-)

Reply via email to