title: TCL: Check file existence by SHELL environment variable
body: <p>I have a shell environment variable <code>PATH_TO_DIR</code> and I want to check in TCL script that the file <code>$PATH_TO_DIR/target.txt</code> exists.</p>
  
  <p>My current solution is:</p>
  
  <pre><code>catch {exec /usr/local/bin/tcsh -c "echo  $PATH_TO_DIR/target.txt" } result
  
  if {![file exists $result]} {
    puts "ERROR: the file $result is not exists"
  }
  </code></pre>
  
  <p>I'm sure there is a more elegant way.<br>
  How can I solve it only with TCL commands?</p>