title: How to preserve newline characters in grep result?
body: <p>I want to assign the grep result to a variable for further use:</p>
  <pre><code>lines=$(cat abc.txt | grep &quot;hello&quot;)
  </code></pre>
  <p>but seems newline characters are removed in the result,  when I do</p>
  <pre><code>echo $lines
  </code></pre>
  <p>only one line is printed. How can I preserve newline characters, so when I echo $lines, it generates the same result as <code>cat abc.txt | grep &quot;hello&quot;</code> does.</p>