title: Execute sed command inside TCL script
body: <p>I am trying to execute sed command inside TCL  script . Basically i wanted to remove all empty lines from the input file before reading the file using TCL. so i tried  following in my script  </p>
  
  <pre><code> exec sed -i '/^\s*$/d' .tmp.PG_Ring
   set fid [open ".tmp.PG_Ring" r]
  </code></pre>
  
  <p>But the script is dumping following Error . </p>
  
  <pre><code>sed: -e expression #1, char 1: unknown command: `''
  while executing
  "exec sed -i '/^\s*$/d' .tmp.PG_Ring"
  (file "pg_ring.tcl" line 1)
  </code></pre>
  
  <p>could you please provide me work around for this &amp; help me with best way to do this?</p>