title: Shell script printing contents of variable containing output of a command removes newline characters
body: <p>I'm writing a shell script which will store the output of a command in a variable, process the output, and later echo the results. Here's what I've got:</p>
  
  <pre><code>stuff=$(diff -u pens tape)
  # process the output
  echo $stuff
  </code></pre>
  
  <p>The problem is, the output I get from running the script is this:</p>
  
  <pre><code>--- pens 2009-09-27 10:29:06.000000000 -0400 +++ tape 2009-09-18 16:45:08.000000000 -0400 @@ -1,4 +1,2 @@ -highlighter -marker -pencil -POSIX +masking +duct
  </code></pre>
  
  <p>Whereas I was expecting this:</p>
  
  <pre><code>--- pens 2009-09-27 10:29:06.000000000 -0400
  +++ tape 2009-09-18 16:45:08.000000000 -0400
  @@ -1,4 +1,2 @@
  -highlighter
  -marker
  -pencil
  -POSIX
  +masking
  +duct
  </code></pre>
  
  <p>It looks like the newline characters are being removed somehow. How do I get them to say in?</p>