Gopi K
Answered On : Jun 21st, 2007
C shell - @
Bourne - %
Ksh - $
Login to rate this answer.
Hi gopi
Thanks for your response
I know the answer which u have mentioned here but we can also change the command prompt using the chsh command ,at this point, again this becomes a question?
Login to rate this answer.
Pruthvi
Answered On : Jul 13th, 2007
Hi
If we type any not existed command then the shell tell you that the command is not existed along with the shell name
Ex:
$ hello
then it says
bash:command not found
means that you are working with bash shell
Login to rate this answer.
Rakesh
Answered On : Aug 8th, 2007
echo $SHELL will give you the shell name as well as the path.
Login to rate this answer.
$echo $SHELL
/bin/ksh
$
$csh
% echo $SHELL
/bin/ksh
% hello
hello: Command not found.
%
-->> The variable $SHELL doesn't show the shell when I changed the shel from ksh to csh
-->> Even trying to execute a non shell command (like hello) didn't tell the name of the shell as you can see here above.
Login to rate this answer.
I dont think so just by looking at the prompt one can recognize the shell [inputs pls, if otherwise], however you can run small commands to get the shell that you are using
ps -p $$
should be your answer.
Login to rate this answer.
There is no such way just by looking at the prompt as this is changable.
Login to rate this answer.