This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
RE: /etc/profile in BASH
- To: "Masterson, Dave" <dmasters at rational dot com>
- Subject: RE: /etc/profile in BASH
- From: Earnie Boyd <earnie_boyd at yahoo dot com>
- Date: Fri, 29 Sep 2000 12:50:47 -0700 (PDT)
- Cc: "'cygwin at sources dot redhat dot com'" <cygwin at sources dot redhat dot com>
--- "Masterson, Dave" <dmasters@rational.com> wrote:
>
> > > Also, in order to be compatible with other UNIX system
> > > shells (Kshell), a user may have setup ~/.profile
> > > particularly for KShell and ~/.bash_profile
> > > particularly for BASH. Since BASH will not read
> > > ~/.profile if it finds ~/.bash_profile (or ~/.bash_login),
> >
> > I just tested this. Bash reads both ~/.profile and ~/.bash_profile
> > or ~/.bash_login. If both ~/.bash_profile and ~/.bash_login are
> > present then only ~/.bash_profile is executed.
>
> If true, that sounds like a bug in BASH. AFAIK, ~/.bash_profile (and
> ~/.bash_login) were setup to provide a simple way of ensuring that special
> BASH functionality could be isolated from other shells. According to the
> BASH man page, after /etc/profile on login, BASH is only supposed to read
> *one of* ~/.bash_profile, ~/.bash_login, and ~/.profile (in that order).
> Are you sure your test wasn't skewed because of the "source" in /etc/profile
> (or elsewhere)?
You're right. Removing the test for ~/.profile from /etc/profile causes only
~/.bash_profile to be executed.
I've modified my /etc/profile removing both tests.
I've created a ~/.bash_profile which tests for the ~/.bashrc and sources it if
found.
Cheers,
=====
Earnie Boyd
mailto:earnie_boyd@yahoo.com
--- <http://earniesystems.safeshopper.com> ---
--- Cygwin: POSIX on Windows <http://gw32.freeyellow.com/> ---
--- Minimalist GNU for Windows <http://www.mingw.org/> ---
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com