title: Catching return value from Tcl in batch
body: <p>This is my Tcl script</p>
  
  <pre><code>return 2
  </code></pre>
  
  <p>It is doing nothing, but just returning value 2. Now my batch script call this tcl file called foo.</p>
  
  <pre><code>tclsh foo.tcl
  </code></pre>
  
  <p>The return value can change from time to time and I need to get this value in the batch file. Is thr a way to do that. I am new to batch commands, so I dont have much idea about this. I tried if-else loop, but it gives syntax error. Any idea would be appreciated.</p>