I work on an AIX system where I have no administrator privileges. It has several shells installed, default being tcsh. I am not allowed to change the login shell. Usually I start my session from exec bash. The problem is that I do not inherit the $PATH I had in tsch. The first strange thing is that some of the entries in my $PATH are duplicated, when I do exec bash. Another strange thing is that when I do exec bash --norc and then source .bashrc everything is fine -- I get the path from tcsh and some additions from my .bashrc.
I have tried commenting out my .bashrc enirely, but it gave no result -- I still do not get the $PATH from tcsh. It seems that the system wide /etc/profile is manipulating my $PATH. I tried running exec bash --noprofile, but I still see the changes, that are introduced by /etc/profile script (which I have no control over).
So in the end perhaps someone spotted a flaw in my investigation and can tell me how to invoke bash with inhereted $PATH or can suggest a way to do it without reading the global config scripts?
(I have posted this question on superuser as well, I am not sure if it is ok, to duplicate questions, but I got no answer there, so what a heck...)
PATHin~/.bashrc; see Difference between .bashrc and .bash_profile. Runexec bash -xto see what's going on when you start bash; post the trace here. – Gilles Dec 8 '11 at 21:00