title: Use Expect to Fill In a Multiline Prompt
body: <p>I am trying to use Expect to autocomplete some prompts. One of the prompts, asks the user to enter some text and then press CTR-D to save the text or CTR-C to cancel. I do not know for sure, but I assume the program that I am trying to autocomplete is using cat to write to a file (like cat > file.txt). </p>
  
  <p>Expect does not seem to be able to send text to this multiline prompt. When I execute, the line "Enter task description (^D to end text entry, ^C to abort): " appears and then it just hangs until it times out. Does anyone know how to do this using Expect? </p>
  
  <p>My Script:</p>
  
  <pre><code>#!/usr/bin/expect 
  
  spawn tasks create
  
  expect "Task assigned to (default=you): "
  send "name\r"
  
  expect "Enter a title: "
  send "This is a test\r"
  
  expect "Priority (default=wishlist): "
  send "high\r"
  
  expect "Comma-separated list of subscribers (default=None): "
  send "None\r"
  
  expect "Comma-separated list of task tags (default=None): "
  send "None\r"
  
   expect "Enter task description (^D to end text entry, ^C to abort): "
   send "Description\r"
   send /004
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>[name@xxxx.xxx ~/createtasks] ./innerscript.exp
  spawn tasks create
  Task assigned to (default=you): name
  Enter a title: This is a test
  Priority (default=wishlist): high
  Comma-separated list of subscribers (default=None): None
  Comma-separated list of task tags (default=None): None
  Enter task description (^D to end text entry, ^C to abort):
  [name@xxxx.xxx ~/createtasks] 
  </code></pre>
  
  <p>It seems like this should be simple... Thanks!</p>