[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Shell function reporting

From: Paul Jarc
Subject: Re: [PATCH] Shell function reporting
Date: Wed, 07 Jan 2004 13:43:42 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Paul Eggert <address@hidden> wrote:
> It is appropriate to test SHELL since that (presumably) is the shell
> that is running this script.

I just checked /bin/sh on BSD/OS, {Net,Free,Open}BSD, and Solaris,
along with bash, pdksh, and Solaris ksh - of those, only bash and
Solaris ksh automatically set SHELL, and only when it's not already
set in the environment.  So, e.g., if SHELL is set by the login
program to the user's login shell, then a script will see that same
value for SHELL, regardless of what shell is running the script.

I haven't looked at the whole script, but from the snippet posted, I
don't see any reason to expect SHELL to necessarily be the same as
CONFIG_SHELL the second time through.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]