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

Re: which shell I'm using?



Incoming from Ruben Porras:
> 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

$ tcsh
infidel:~> echo $shell
/bin/tcsh

Note case.  btw, consider what Linus said about tcsh (I paraphrase):
"A steaming pile of excrement."

If your script is to execute under a specific shell, give it a
shebang.  If it calls scripts written in another shell, those should
have their own shebang.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)               http://www.spots.ab.ca/~keeling 
- -



Reply to: