title: High capacity buffer fifo or use of a file as buffer for a fifo
body: <p>In a bash script i pipe the output of a command into the input of another using:</p>
  
  <pre><code>$ output_com | input_com
  </code></pre>
  
  <p><code>output_com</code> is slower than <code>input_com</code>. In my script, before <code>input_com</code> is ready to operate, some other commands needs to be executed. </p>
  
  <p>In order to speed up things, i would like to start <code>output_com</code> at the beginning of the script, outputing into some kind of high capacity fifo, do others commands thats needs to be done then execute <code>input_com</code> with the fifo in input. Something like this:</p>
  
  <pre><code>#!/bin/bash
  #
  mkfifo /tmp/fifo
  output_com &gt; /tmp/fifo &amp;
  
  somecommand1
  somecommand2
  input_com &lt; /tmp/fifo
  </code></pre>
  
  <p>Unfortunatelly the buffer size of fifos is too small for my use case so <code>output_com</code> is quickly blocked before <code>input_com</code> starts to read. 
  The volume of data shared between theses to commands can vary from 500MB to 1GB approx. </p>
  
  <p>Is there some mechanism, tool or concept i'm not aware of that could allow <code>output_com</code> to start to buffer many MBs on the fifo before <code>input_com</code> starts to read ? </p>
  
  <p>For example, it would be great if the fifo buffer could be baked by a tmp file (hdd used as buffer) but i have not found how to do that. Using a simple file is non blocking and makes <code>input_com</code> to terminate before <code>output_com</code> finishes.</p>