From owner-freebsd-questions@FreeBSD.ORG Fri Jun 11 13:02:38 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52D3816A4CE for ; Fri, 11 Jun 2004 13:02:38 +0000 (GMT) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12E2443D58 for ; Fri, 11 Jun 2004 13:02:38 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.no-ip.com ([66.30.196.44]) by comcast.net (rwcrmhc11) with ESMTP id <20040611130223013009b5tfe>; Fri, 11 Jun 2004 13:02:23 +0000 Received: by be-well.no-ip.com (Postfix, from userid 1147) id C3D3D74; Fri, 11 Jun 2004 09:02:26 -0400 (EDT) Sender: lowell@be-well.ilk.org To: "Arend P. van der Veen" References: <40C8A133.9020300@capital.net> From: Lowell Gilbert Date: 11 Jun 2004 09:02:26 -0400 In-Reply-To: <40C8A133.9020300@capital.net> Message-ID: <44wu2e4599.fsf@be-well.ilk.org> Lines: 47 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: Bash Startup Files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2004 13:02:38 -0000 "Arend P. van der Veen" writes: > Hi, > > I have been trying to clarify what bash startup files are sourced and > when. I am using bash-2.05b.007. I have been hunting around on the > web and I have > found the following summary: For Login shells: > > On logging in: > If `|/etc/profile|' exists, then source it. > > If `|~/.bash_profile|' exists, then source it, > else if `|~/.bash_login|' exists, then source it, > else if `|~/.profile|' exists, then source it. > > On logging out: > If `|~/.bash_logout|' exists, source it. > > For non-login interactive shells: > On starting up: > If `|~/.bashrc|' exists, then source it. > > For non-interactive shells: > On starting up: > If the environment variable |ENV| is non-null, expand the > variable and source the file named by the value. If Bash is > not started in Posix mode, it looks for |BASH_ENV| before > |ENV|. > > (From http://www.cse.unsw.edu.au/help/doc/info/bash/Bash_Startup_Files.html) There are easier ways to find the manual. "info bash" or even "man bash" would have gotten you to the information... > Other discussions on this topic essentially state the same thing. > After some testing it is not clear to me if bash under FreeBSD 4.9 is > working the same way. I have a case where both ~/.profile and > ~/.bash_profile exist and both are sourced. This is in contradition > to the above statements. I can't reproduce this. In my own setup, it is clearly not the case. > Can anybody point me to information to clarify what bash startup files are sourced > and when ? As far as I can see, the Fine Manual is entirely accurate on this point.