PDA

View Full Version : role of $SHELL ambiguous



dexter.deepak
July 16th, 2008, 04:35 PM
echo $SHELL
this is supposed to return the value of the shell we are using.
this is what i do :


dpak@dpak-server:~$ echo $SHELL
/bin/bash
dpak@dpak-server:~$ csh
% echo $SHELL
/bin/bash

i think it was supposed to return /bin/csh in the latter case.where am i wrong ? and is there any way to get the value of the "temporary" shell ?

dtmilano
July 16th, 2008, 04:44 PM
What about this ?


ps -f

ghostdog74
July 16th, 2008, 04:50 PM
i think it was supposed to return /bin/csh in the latter case.where am i wrong ? and is there any way to get the value of the "temporary" shell ?

$SHELL is not a c-shell in built variable. Its for bash. use $shell for csh.


/test# echo $shell
/bin/tcsh

always check the man page.