[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

which shell I'm using?



docs I've read says echo $SHELL, while you remain in the system with the
original login shell 
echo $SHELL
gives the correct answer, but not in case you have executed another
shell, for example:

$ echo $SHELL
/bin/bash
$ csh
% echo $SHELL
/bin/bash
% exit
$ tcsh
nahoo:~> echo $SHELL
/bin/bash

so, echo $SHELL seems not to be reliable, how could I now which shell I
am using? (Imagine you need to know in a script)?

Many thanks.



Reply to: