Paul Eggert <eggert@xxxxxxxxxxx> 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. paul