From owner-freebsd-questions@FreeBSD.ORG Mon Mar 1 00:24:19 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 B1B6B16A4CE for ; Mon, 1 Mar 2004 00:24:19 -0800 (PST) Received: from dyer.circlesquared.com (host217-45-219-83.in-addr.btopenworld.com [217.45.219.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B01843D2F for ; Mon, 1 Mar 2004 00:24:14 -0800 (PST) (envelope-from peter@circlesquared.com) Received: from circlesquared.com (localhost.petanna.net [127.0.0.1]) i218PK1J040553; Mon, 1 Mar 2004 08:25:31 GMT (envelope-from peter@circlesquared.com) Message-ID: <4042F370.40502@circlesquared.com> Date: Mon, 01 Mar 2004 08:25:20 +0000 From: Peter Risdon User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5b) Gecko/20031102 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gerard-seibert@rcn.com References: <20040229192222.A7D0816A4EC@hub.freebsd.org> <20040229180148.B693.GERARD-SEIBERT@rcn.com> In-Reply-To: <20040229180148.B693.GERARD-SEIBERT@rcn.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: Search Path in Bash 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: Mon, 01 Mar 2004 08:24:19 -0000 Gerard Seibert wrote: >Peter Risdon writes: > > >>When bash is invoked as an interactive login shell, or as a non-inter- >> active shell with the --login option, it first reads and >>executes com- >> mands from the file /etc/profile, if that file exists. After >>reading >> that file, it looks for ~/.bash_profile, ~/.bash_login, and >>~/.profile, >> in that order, and reads and executes commands from the first >>one that >> exists and is readable. The --noprofile option may be used >>when the >> shell is started to inhibit this behavior. >> >> >> >> > >********** Reply Separator ********** >Sunday, February 29, 2004 6:01:48 PM > >Peter, you stated the following: > >When bash is invoked as an interactive login shell, or as a non-inter-active >shell with the --login option, it first reads and executes commands >from the file /etc/profile, if that file exists. After reading that >file, it looks for ~/.bash_profile, ~/.bash_login, and >~/.profile, in >that order, and reads and executes commands from the first one that >exists and is readable > > The credit has been lost along the way, but I was quoting the man page. >If I am following you correctly, then having a ~/,bashrc, ~/.bashrc or >~/.profile file is worthless, if bash reads only the first file that it >finds. I am referring in this scenario to the ~/.bash_profile file. > > I haven't ever tried multiple ~/.bashconfigfiles. FWIW, the idea that more than one might get read seems a little scary. If it was, trying to debug unexpected bash behaviour would certainly lead to a head-shaped crater in the wall by my desk. >That isn't exactly what I gleamed from the "FreeBSD" book by Annelise >Anderson. Perhaps what she is referring to is an older version of bash. > > I'm sorry, but I haven't read this. >I am not insinuating that you are incorrect; I am just trying to get >the most accurate information in regards to how bash works. > > Absolutely. PWR.