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. Usualy 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?

link|improve this question
Did you try --norc as well to avoid system and local bashrc files? They could overwrite the path too. – Paul Dec 8 '11 at 0:42
I did try as I have described in my question: "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" – mezhaka Dec 8 '11 at 9:35
Reposted on Unix & Linux (and has answers there) – Gilles Dec 8 '11 at 20:57
feedback

closed as too localized by Gilles, studiohack Dec 8 '11 at 21:01

This question is unlikely to ever help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. See the FAQ for guidance on how to improve it.

Browse other questions tagged or ask your own question.