title: exec not working in expect script
body: <p>I'm writing my first expect script, so I may be missing something obvious, but I find the following quite puzzling:</p>
  
  <pre><code>$ expect
  expect1.1&gt; exec echo a
  a
  expect1.2&gt;
  $ cat &gt; test.exp
  exec echo a
  $ expect test.exp
  $
  </code></pre>
  
  <p>If I run expect and make it exec something manually, it works. If I put the same command in a script, it doesn't work. What's going on?</p>