$ echo $SHELL /bin/bash $ /bin/ksh93 $ echo $SHELL /bin/bash $ file /bin/ksh93 /bin/ksh93: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped $ getent passwd test111 test111:x:1008:1008:,,,:/tmp:/bin/ksh93 $ ssh test@localhost test@localhost's password: $ echo $SHELL /bin/ksh93 $ bash $ echo $SHELL /bin/ksh93
I expect the
$SHELL to change after running another shell. Why doesn't it?
P.S. However the shell does change, only $SHELL variable remains the same:
$ dash $ echo $SHELL /bin/bash $ T=test ; [[ $T = *est ]] && echo ok dash: [[: not found