title: How can I prevent expect from ignoring new lines?
body: <p>In my current, draft script, the <code>show</code> command output is fine, but once I hit the "conf" commands, the output is pressed together. How do I fix this?</p>
  
  <pre><code>set timeout 20
  spawn ssh -l manager 192.168.41.10.10
  expect "manager@192.168.10.10's password:"
  send "admin\r"
  expect "Press any key to continue"
  send "j"
  log_file hp.log
  send "show vlan 10\r"
  expect "newsw*"
  send "conf\r"
  expect "newsw*(config)"
  send "\r"
  send "vlan 45\r"
  expect "newsw*"
  send "tagged 3\r"
  send "exit\r"
  send "exit\r"
  </code></pre>
  
  <p>The is what the log looks like for the "conf" section and related commands. The output is running together. You can see a piece of the "show vlan 45" at the end. </p>
  
  <pre><code>newswitch# confnewswitch(config)# vlan 45newswitch(vlan-45)# tagged 3newswitch(vlan-45)# exitnewswitch(config)# exitnew$ Status and Counters - VLAN Information - VLAN 45
  
        VLAN ID : 45
        Name : VLAN45
  </code></pre>
  
  <p>Here is the proper / desired output. I would think that it would look like this:</p>
  
  <pre><code>newswitch# 
  conf
  newswitch(config)# vlan 45
  newswitch(vlan-45)# tagged 3
  newswitch(vlan-45)# exit
  newswitch(config)# exit
  newswitch$ show vlan 45 ....and so forth
  </code></pre>