title: Read line by line from standard input Bash
body: <p>I'm studying <a href="/questions/tagged/bash" class="post-tag" title="show questions tagged &#39;bash&#39;" rel="tag">bash</a> language and an exam track says this:</p>
  
  <blockquote>
    <p>It should read one input (from standard input) at a time (each entry
    is a string and then ends with a newline).</p>
  </blockquote>
  
  <p>My questions are two:</p>
  
  <ol>
  <li><p>How do I read line by line from standard input in Bash? Until now I used <code>"read string"</code> but I do not think that it reads a line at a time.</p></li>
  <li><p>I do not know if this is a stupid question , but once created the script how can I give more lines to the script  as input (read from standard input of course). For example from <a href="/questions/tagged/stdin" class="post-tag" title="show questions tagged &#39;stdin&#39;" rel="tag">stdin</a> I insert two lines (<code>hello</code> and <code>world</code>). How do I give to the bash script these two lines?</p></li>
  </ol>