title: How to check what shell is running?
body: <p>I need to check if the script is running from <code>bash</code> or <code>csh</code>. </p>
  
  <pre><code>#!/bin/csh
  
  if ( `echo $SHELL` != '/bin/tcsh' )
     echo 'Please run it in csh' 
     exit
  endif
  </code></pre>
  
  <p>This code is giving </p>
  
  <pre><code>bash: g.csh: line 7: syntax error: unexpected end of file
  </code></pre>