title: Why does "exec" gives "child exited abnormally" in this code?
body: <p>I am running this code in tcl:-</p>
  
  <pre><code>set version [exec grep "INTERNAL VERSION:" mojave.log | sed -n -e "s/INTERNAL VERSION: //g" &gt; xor.diff]
  
  set p [exec diff ../log.warning.diff ../log.warning.gold &gt;&gt; xor.diff ]
  </code></pre>
  
  <p>For the last line it gives the following error after doing some diff:- </p>
  
  <pre><code>&gt; RULE-311 WARNING: Gdsii layer number 85 datatype 0 has already been defined
  &gt; TCL-11   WARNING: Command "check quartz drc" is overridden, Quality Of
  &gt; TCL-11   WARNING: Command "delete marker quartz" is overridden, Quality Of
  &gt; TCL-11   WARNING: Command "import marker quartz" is overridden, Quality Of
  &gt; TCL-11   WARNING: Command "mojave! run filter log" is overridden, Quality Of
  &gt; TCL-11   WARNING: Command "run quartz gui" is overridden, Quality Of Results
  &gt; TCL-11   WARNING: Command "ui! mojave draw rectangle" is overridden, Quality
  &gt; TCL-11   WARNING: Command "ui! mojave set_context" is overridden, Quality Of
  &gt; TCL-12   WARNING: Overridden command "mojave! run filter log" is used,
  child process exited abnormally
       while executing
  "exec diff ../log.warning.diff ../log.warning.gold 2&gt; xor.diff "
       invoked from within
  "set p [exec diff ../log.warning.diff ../log.warning.gold 2&gt; xor.diff ]"
       (file "test.tcl" line 4)
       invoked from within
  "source test.tcl"
  </code></pre>
  
  <p>And it is not writing anything in "<code>xor.diff</code>" file.</p>