title: tcl: How to determine shell for module command
body: <p>I am programming in tcl (for use with the modules command). I need to find out what shell is being used by the user. Since I've never programmed in tcl before, I don't know what is wrong with my simple code. Can someone please advise?</p>
  
  <pre><code>set shell [module-info shell]
  if { $shell=="bash" } {
      puts "running bash"
  }
  </code></pre>
  
  <p>The error I'm getting (sorry I didn't include it originally) is:</p>
  
  <pre><code>intel64(32):ERROR:102: Tcl command execution failed: if { $shell == "bash" } {
      puts "running bash
  }
  </code></pre>
  
  <p>Note that intel64 is the file where this code is found and line 34 is the last line.</p>