title: Expect script that enters a username and password repeatedly
body: <p>I have a script that needs to switch between various branches in my subversion repository in order to do a copy. This results in having to enter the password repeatedly. Now, once I have done this a couple of time and i am well into my script. I mess up causing me great anger.</p>
  
  <p>I have used expect to enter a password on a prompt before. I was hoping to learn how to get expect to run over multiple password prompts again and again and again, until the task is finished. </p>
  
  <p>So far this is what I have. </p>
  
  <pre><code>#!/usr/bin/expect
  global env
  set timeout 10
  spawn command that requires password
  expect "^user"
  send "password\r"
  #i need this to repeat over and over until the prompt stops showing up.
  </code></pre>
  
  <p>Please and thank you.</p>