[sf-lug] dash(1), bash(1), and SHELL

Michael Paoli Michael.Paoli at cal.berkeley.edu
Mon Aug 22 23:02:55 PDT 2016


> From: jim <jim at well.com>
> Subject: Re: [sf-lug] shell, man(1) [was: path name expansion]
> Date: Sat, 20 Aug 2016 17:19:30 +0000

> $ echo $SHELL $SHLVL
> /bin/bash 1
> $ dash
> $ echo $SHELL $SHLVL
> /bin/bash 1
>
> Tne dash shell does not set the SHELL or
> the SHLVL variables. I tried to create

bash(1), however ...
bash(1)
...
SHELL  The full pathname to the shell is kept in this environment vari-
        able.   If  it is not set when the shell starts, bash assigns to
        it the full pathname of the current user's login shell.
...
However ...
$ (unset SHELL; bash -c 'env') | grep '^SHELL='
$
Sometimes documentation lies.  When in doubt, test.





More information about the sf-lug mailing list