title: Bash while loop iterates only once whenever body contains ssh
body: <p>I'm reading host information from a text file and pass it to an ssh command:
  The text file contains the host, user and password for the ssh command</p>
  
  <pre><code>while read LINE
  do
      R_USER=$(echo $LINE | cut -d ',' -f 1)                  
      R_HOST=$(echo $LINE | cut -d ',' -f 2)                                  
      PY_SCRIPT=$(echo $LINE | cut -d ',' -f 4)               
  
      ssh $R_USER@$R_HOST 'touch /home/user/file_name.txt'
  
  done &lt;/path_name/file_name
  </code></pre>
  
  <p>As it turns out the while loop is only executed once even if the host text file contains multiple host information.
  When I remove the ssh command the while loop gets executed as much as there are lines in the host information text file.</p>
  
  <p>Not sure why this is so.
  Any information on this?</p>
  
  <p>Roland            </p>