title: read keyboard input within a pipelined read loop
body: <p>In a script, I'd like to read a process output line by line, and get a confirmation from the user. So far I've done this:</p>
  
  <pre><code>mycommand-outputpiped | while (read line)
  do
     read line
     #dostuff
  
     read confirm #oops -&gt; this read the next item from the pipe, not the keyboard
  done
  </code></pre>
  
  <p>So I tried to add:</p>
  
  <pre><code>read confirm &lt; /dev/stdin
  </code></pre>
  
  <p>But it didn't change the thing, it still reads the next line from the pipe... 
  How should I handle this?</p>