title: How do I tell what type my shell is
body: <p>How can I tell what type my shell is?  ie, whether it's traditional sh, bash, ksh, csh, zsh etc.</p>
  
  <p>Note that checking <code>$SHELL</code> or <code>$0</code> won't work because <code>$SHELL</code> isn't set by all shells, so if you start in one shell and then start a different one you may still have the old <code>$SHELL</code>.</p>
  
  <p><code>$0</code> only tells you where the shell binary is, but doesn't tell you whether <code>/bin/sh</code> is a real Bourne shell or bash.</p>
  
  <p>I presume that the answer will be "try some features and see what breaks", so if anyone can point me at a script that does that, that'd be great.</p>