title: How to close a sh session in expect
body: <p>spawn sh example1</p>
  
  <p>expect " password"</p>
  
  <p>send "password\r" </p>
  
  <p>How to close this sh session so that password 2 is accepted in example 2 session </p>
  
  <p>spawn sh example2</p>
  
  <p>expect "Enter host password"</p>
  
  <p>send "password 2"</p>
  
  <p>Tried close didn't work 
  Thanks in advance.</p>