bash, you can get that information using the
shopt function. For example
if shopt -q login_shell ; then
echo "login"
fi
will only echo login if you are in a login shell..
This is one of the many other tricks that exist:
http://defindit.com/readme_files/bash_examples.html
ciao,
--
Stefan Michalowski
Email: mitch

PGP Key: http://screamerone.zapto.org/k.asc