Your terminal is not a terminal: An Introduction to Streams
This is a good article, but this bit irks me:<p><pre><code>  $ printf &quot;Look, I have something inside&quot; &gt; &#x2F;tmp&#x2F;careful.txt
  $ cat &#x2F;tmp&#x2F;careful.txt
  Look, I have something inside
  $ printf &quot;\nNow I have one more thing&quot; &gt;&gt; &#x2F;tmp&#x2F;careful.txt
  $ cat &#x2F;tmp&#x2F;careful.txt
  Look, I have something inside
  Now I have one more thing
  $
</code></pre>
What really happens is:<p><pre><code>  $ printf &quot;Look, I have something inside&quot; &gt; &#x2F;tmp&#x2F;careful.txt
  $ cat &#x2F;tmp&#x2F;careful.txt
  Look, I have something inside$ printf &quot;\nNow I have one more thing&quot; &gt;&gt; &#x2F;tmp&#x2F;careful.txt
  $ cat &#x2F;tmp&#x2F;careful.txt
  Look, I have something inside
  Now I have one more thing$
</code></pre>
And what you want is:<p><pre><code>  $ printf &quot;Look, I have something inside\n&quot; &gt; &#x2F;tmp&#x2F;careful.txt
  $ cat &#x2F;tmp&#x2F;careful.txt
  Look, I have something inside
  $ printf &quot;Now I have one more thing\n&quot; &gt;&gt; &#x2F;tmp&#x2F;careful.txt
  $ cat &#x2F;tmp&#x2F;careful.txt
  Look, I have something inside
  Now I have one more thing
  $
</code></pre>
Newlines are line terminators, not separators. This article missed what could have been a really good section on line buffering that could have explained some of the merit of having line terminators as opposed to line separators.