[TriLUG] to delete root, or not too?
Aaron S. Joyner
aaron at joyner.ws
Tue Nov 14 09:44:52 EST 2006
Joseph Mack NA3T wrote:
> On Tue, 14 Nov 2006, Alan Porter wrote:
>
>>
>> Otherwise, it depends on reading the running user's preferred shell
>> (in most cases, from the current value of the $SHELL variable).
>
>
> (just a warning).
>
> $SHELL gives (in the case of tcsh/csh/bash) the shell you opened the
> session with, not your current shell. This is a real pain - I would
> have hoped that I'd get my current shell. I have to run csh scripts at
> work and I'm always invoking csh, editing and running scripts and then
> later exiting. It's not easy to see which shell I'm in. At the command
> prompt, I run setenv to see if it fails.
>
> Joe
>
That's surprising behavior, but if you wanted something different, you
could just explicitly set $SHELL in your localized startup scripts for
each shell. ie. in .bashrc set SHELL=/bin/bash and in your .cshrc
setenv BASH /bin/csh, same for tcsh.
Aaron S. Joyner
More information about the TriLUG
mailing list