title: How to preserve new line in shell script output?
body: <p>I have a line in my shell script like below</p>
  
  <pre><code>output_logs=`sh script2.sh $1 $2`
  </code></pre>
  
  <p><code>script2.sh</code> produce lots of lines of logs. I want to <code>grep</code> specific lines of its output. The problem I have is <code>$output_logs</code> has the entire output of <code>script2.sh</code> as a single line string and <code>grep</code> produces strange results because of this. How to get the logs from <code>script2.sh</code> to be stored in individual lines?</p>