title: How to merge sorted files without using a temporary file?
body: <p>I'm trying to merge many sorted files in a UNIX/Linux script with <code>sort -m</code>, and I noticed that <code>sort</code> first writes the result to a temporary file, then copies it to destination. My understanding of <code>-m</code> was that it assumes the files are sorted, so using a temporary file is completely unnecessary, and it wastes both hard disk space and CPU cycles (I'm using <code>sort</code> in a pipeline which gets stuck waiting for sort to output anything.) Is there a way to tell <code>sort</code> to not use temporary files when merging sorted files? Or a better version which doesn't?</p>
  
  <p>The exact CL looks like:</p>
  
  <pre><code>$ sort -m -s -t '_' -k 1,1n -k 2,2n &lt;(gunzip &lt;file_1) [...] &lt;(gunzip &lt;file_n) | gzip &gt;output
  </code></pre>
  
  <p>I'm using <code>sort</code> from GNU coreutils 5.97.</p>