title: how to pause in a loop of "read line"
body: <p>I know that<br>
  (1) I can loop through lines of a file with  </p>
  
  <pre><code>while read line  
  do  
      something  
  done &lt; file 
  </code></pre>
  
  <p>(2) I can pause my program with  </p>
  
  <pre><code>something  
  read -p "press any key to continue..."  ## pause here waiting for key in  
  something 
  </code></pre>
  
  <p>However, the pause trick does not work in a read line loop like this  </p>
  
  <pre><code>while read line  
  do  
      something  
      read -p "press any key to continue..."  ## suppose to pause here  
  done &lt; file 
  </code></pre>
  
  <p>So why is that and how to get over it?</p>