senthilS wrote:
> ...
Both "$0" and "ps" can be easily spoofed, and well as
needing to cater to portability concerns. In addition,
many shells will "advertise" themselves as another
shell ("bash" and "ksh" as "sh", etcetera) ostensibly
for configuring feature visibility yet obscuring the
controlling standard (SYS5, BSD, POSIX, ...).
For a non-trivial solution (listed in order of general
scope), see if any of the following fit your specific needs:
"shtype"
http://shelldorado.com/scripts/cmds/shtype.txt
"The Kameleon Shell.sh"
http://www.unixreview.com/documents/s=1344/ur0312e/
"whichshell"
http://groups.google.com/group/comp....513a857080ed64
"which_interpreter"
http://stchaz.free.fr/
=Brian