[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: /bin/sh should set SHELL to /bin/sh
From: |
Greg Wooledge |
Subject: |
Re: /bin/sh should set SHELL to /bin/sh |
Date: |
Fri, 14 Jul 2017 16:13:13 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Sat, Jul 15, 2017 at 02:59:41AM +0700, Robert Elz wrote:
> IMO, if SHELL gets unset (it is usually initialised by login, or its
> equivalent), it should simply stay unset, and not be set to anything,
> until some user (or script) decides to set it again.
wooledg:~$ unset SHELL
wooledg:~$ bash -c 'echo "$SHELL"'
/bin/bash
wooledg:~$ ksh -c 'echo "$SHELL"'
/bin/sh
wooledg:~$ zsh -c 'echo "$SHELL"'
wooledg:~$ tcsh -c 'echo "$SHELL"'
SHELL: Undefined variable.
Looks like there's not much agreement here.