Date: Fri, 26 Feb 1999 07:27:44 +1000 From: Greg Black <gjb@comkey.com.au> To: "Richard E. Hawkins Esq." <rhawkins@iastate.edu> Cc: Pat Lynch <lynch@rush.net>, freebsd-questions@FreeBSD.ORG Subject: Re: csh or bash (newbie) Message-ID: <19990225212745.3332.qmail@alpha.comkey.com.au> In-Reply-To: <m10FmvT-000P4nC@eyry.econ.iastate.edu> of Wed, 24 Feb 1999 16:37:07 CST References: <m10FmvT-000P4nC@eyry.econ.iastate.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
[Apologies to anybody who sees this twice. I had a slip of the
fingers earlier this morning.]
> I would like a .file that, on starting interactively, checks to see
> if bash is available, and then executes it, otherwise staying in sh
It's not quite clear what you mean. If you mean that you'd like
to have your login shell set to sh but that it should check for
bash and run that instead, it's trivial. Put the following lines
at the top of your ~/.profile file:
[ "x$BASH" = "x" ] && [ -x /usr/local/bin/bash ] &&
SHELL=/usr/local/bin/bash exec /usr/local/bin/bash --login
This makes sure that you're not already running bash and then
replaces your shell with a bash login shell if it's available.
--
Greg Black <gjb@acm.org>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990225212745.3332.qmail>
