RE: How to find your shell



Valdis Kletnieks vt edu wrote......

> Strictly speaking, $SHELL is *NOT* "the currently 
> executing shell". From 'info bash':

> `SHELL'
     The full pathname to the shell is kept in this 
     environment variable.  If it is not set when 
     the shell starts, Bash assigns to it the full 
     pathname of the current user's login shell.

> So if you have csh as your login shell, and do 
> the following:

> % echo $SHELL
> /bin/csh
> % unsetenv SHELL
> % exec /bin/bash
> % echo $SHELL     # at this point you're running 
>   bash,  but SHELL is 
> /bin/csh....

You see the point is "which shell are you are 
intrested in?" Are you interested in the currently 
executing shell. Or you are interested in your 
login shell. The former is aval thru echo $SHELL.
and the error reporting. The latter is available
thru cat /etc/passwd.

bye
shiraz

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



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