[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
$ csh
% echo $SHELL
% exit
$ tcsh
nahoo:~> echo $SHELL

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: