Hi Brian,
> 1) When i try and force the changes to .bashrc by running source
> .bashrc, the new entries are being added to $PATH but older ones, that
> have been removed during last edit, are not.
source'ing a file is the same as entering the contents of that file at
the shell prompt. So, something similar to this is happening:
pagh:~ $ export PATH=/usr/bin:/bin
pagh:~ $ export PATH="/home/me/bin:$PATH"
pagh:~ $ echo $PATH
/home/me/bin:/usr/bin:/bin
...
pagh:~ $ export PATH="/home/me/bin:$PATH"
pagh:~ $ echo $PATH
/home/me/bin:/home/me/bin:/usr/bin:/bin
If you want to clear out yr $PATH before adding stuff to it, you'd have
to do so explicitly, with a line like
pagh:~ $ PATH=
or
pagh:~ $ unset PATH
Removing specific entries from your $PATH is trickier, involving pattern
matching and replacing. Less fun than you'd think.
> ... when i log out and back in my original PATH now begins with
> /usr/local/bin/j2sdkee1.3.1/bin:/usr/local/bin/j2sdkee1.3.1/bin:/usr/local/bin/j2sdkee1.3.1/bin
If '/usr/local/bin/j2sdkee1.3.1/bin:' appears multiple times in your
path, I can only guess that it's added multiple times during login -
check your .bashrc, .bash_profile, .profile, /etc/profile ... it's got
to be in one of those.
hth,
-kev
--
bicycle man a woman a fish needs a like needs a
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!