Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Mar 2004 09:15:15 +0000
From:      Peter Risdon <peter@circlesquared.com>
To:        gerard-seibert@rcn.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Search Path in Bash
Message-ID:  <4042FF23.307@circlesquared.com>
In-Reply-To: <20040229180148.B693.GERARD-SEIBERT@rcn.com>
References:  <20040229192222.A7D0816A4EC@hub.freebsd.org> <20040229180148.B693.GERARD-SEIBERT@rcn.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Gerard Seibert wrote:

>Sunday, February 29, 2004 6:01:48 PM
>
>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.
>
Just a couple more observations:

/etc/profile and ~/.profile are both in fact the configuration files for 
sh, but bash reads them, presumably because it is at root a feature-rich 
version of sh. Having both shells read the same files would normally be 
a good thing on any given system (if you want, say, a non-standard path 
in sh you'll probably want it in bash too) and so this is the default 
and FreeBSD does not create any of the ~/.bash* files. Therefore, the 
~/.profile file is not worthless on a standard installation of FreeBSD, 
in fact it _is_ the user config file when an interactive bash shell is 
started.

But, as I understand it, if you want to you can override the sh config 
for bash while leaving it in place for sh by using a ~/.bash* file. 
Different versions of these files match different file naming 
conventions of different unixen. But only one such will be read, in a 
stated order of precedence, to avoid confusion.

PWR.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4042FF23.307>