delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/29/08:05:19

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <20000929120428.2638.qmail@web113.yahoomail.com>
Date: Fri, 29 Sep 2000 05:04:28 -0700 (PDT)
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Subject: Re: /etc/profile in BASH
To: "Masterson, Dave" <dmasters AT rational DOT com>,
"'cygwin AT sources DOT redhat DOT com'" <cygwin AT sources DOT redhat DOT com>
MIME-Version: 1.0

--- "Masterson, Dave" <dmasters AT rational DOT com> wrote:
> Question:
> 
> In Cygwin 1.1, why are the last two lines of the installed /etc/profile the
> following?
> 
> 	test -f ./.profile && . ./.profile
> 	test -f ./.bashrc && . ./.bashrc
> 
> As described in the BASH MAN page, it would seem that BASH does this already
> after reading /etc/profile.  Is this required because of the implementation
> of Cygwin on MS-Windows?
> 

IMO, the test -f ./.profile && . ./.profile isn't needed, it will get executed
by bash anyway.  The test -f ./.bashrc && . ./.bashrc is needed because when
bash is in login state it doesn't process ~/.bashrc.  In login state both
/etc/profile and ~/.profile are executed.  In non-login state /etc/profile and
~/.profile aren't executed but ~/.bashrc is but IIRC only for the interactive
state.

Cheers,

=====
Earnie Boyd
mailto:earnie_boyd AT yahoo DOT 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 AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019