Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jun 2016 14:01:30 -0400
From:      Baho Utot <baho-utot@columbus.rr.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: sh[it] and What am I missing here?
Message-ID:  <95af446b-4bca-e0c3-ba32-4c003fade6ea@columbus.rr.com>
In-Reply-To: <86h9d7r09p.fsf@WorkBox.Home>
References:  <57544c10.90e58c0a.cacbc.62fd@mx.google.com> <cdf04501-79ef-9dbb-14f0-ed10a6d7241e@columbus.rr.com> <57545029.5060805@gmail.com> <6f157455-0bda-ef46-82dc-e97fb0c4a08b@columbus.rr.com> <86h9d7r09p.fsf@WorkBox.Home>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06/05/16 13:52, Brandon J. Wandersee wrote:
> Baho Utot writes:
>
>> So here is what I tried.
>> Power on console ( boot computer )
>> Login in as root
>> /bin/sh
>>
>> set    #  to show environment etc
>> WTF SHELL says I am in csh????
>>
>> It should say SHELL=/bin/sh
>>
>> Hence my question here as to what is going on.
> It seems the $SHELL variable is derived from the settings for the
> account you log into. That variable persists when you run another shell,
> as (a) the base environment is inherited by child processes; and (b) the
> (interactive) shell is just another running user program at that point,
> not a base working environment itself.
>
> Log in as root and start a different (interactive) shell, and the
> variable will remain unchanged. Log in as a normal user and start
> another shell, and you'll get the same result. Log in as any user and
> `su` to any other user---simulating a new login---and the value of the
> variable will change to the user shell for the new account.
>
> As I understand it, you can have a script you've executed change the
> variable having it simulate a login shell and parse a custom
> configuration file. See the "Invocation" section of the sh(8) man page
> for an explanation.
>
>

Ok, But I think I will need to talk to Jack Daniels first then I will 
have a look at the man page






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?95af446b-4bca-e0c3-ba32-4c003fade6ea>