delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/29/15:32:12

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: <20000929193011.7944.qmail@web110.yahoomail.com>
Date: Fri, 29 Sep 2000 12:30:11 -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>
Cc: "'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:
> I gotta learn to read more carefully... :-\
> 
> One more time -- having these two lines in /etc/profile means that
> ~/.profile will be (potentially) sourced twice 

IMO, the test for ~/.profile should be removed.

> (~/.bashrc might be as well depending on how the user handles it in >
~/.profile).  

IMO, setup should be modified to put the test for ~/.bashrc in ~/.bash_profile.

> This could have
> unintended consequences where people *add-to* instead of *set* their
> environment variables -- particularly PATH.  This could double the length of
> the PATH variable and slow down access to commands (particularly if one or
> more items on the PATH is a network share).
> 

I agree.  Caution has to be taken.  'Course, caution always has to be taken.

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

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