title: How to pipe output of a command that expects file argument
body: <p>I know you can pipe output of a one command to another - for example</p>
  
  <pre><code>ls -la | less
  </code></pre>
  
  <p>to see output of <code>ls -la</code> inside of <code>less</code> instead of terminal stdio.</p>
  
  <p>But if you use a <code>command</code> with a parameter that saves the output to a file</p>
  
  <pre><code>command --save-to-file file.txt
  </code></pre>
  
  <p>Then how to pipe that to another command?</p>
  
  <p>this way will not work:</p>
  
  <pre><code>command --save-to-file | less
  </code></pre>
  
  <p>because command will complain that you used <code>--save-to-file</code> without any argument (filename)</p>
  
  <p>If I remember well there was something like a buffer or a temp file in ram you could put instead of <code>file.txt</code> so you could do something like:</p>
  
  <pre><code>command --save-to-file ram-buffer.txt &amp;&amp; cat ram-buffer.txt
  </code></pre>
  
  <p>Without even creating a file on disk, it that right?</p>
  
  <p>Why I need that?</p>
  
  <p>Some of commands have only a basic output to the stdio and more useful type of output cannot be printed by them but only saved to file. The thing is I am not interested in saving the more useful type of output to any file at all but just to print it in terminal or pipe to chain of another commands that do the filtering etc and then eventually print the processed output.</p>
  
  <p>I would not like to be responsible to crating a tmp file then delete it etc. Perfectly I would like to just use a kind of magic file (or redirection) in place of <code>file.txt</code> that I could pipe to another command.</p>
  
  <p>It is important to me to not write any content of the output to a disk if this is possible. Just print it in terminal or pipe to other command(s).</p>
  
  <p>At this moment I'm trying to capture output of PHPUnit</p>
  
  <pre><code>phpunit --log-junit log.xml
  </code></pre>
  
  <p>which is not a shell command but a PHP script that uses:</p>
  
  <pre><code>#!/usr/bin/env php
  </code></pre>
  
  <p>But I remember I used to have an example with linux command that I wanted get the output but the form of it was only available with a parameter <code>--save-to-file outputfile.txt</code></p>
  
  <p>Perhaps because piping/redirecting an output designed to be saved to a file is not binary safe and therefore such output can be corrupted when piped/redirected - can it be?</p>