title: paste without temporary files in Unix
body: <p>I'm trying to use the Unix command paste, which is like a column-appending form of cat, and came across a puzzle I've never known how to solve in Unix.</p>
  
  <p>How can you use the outputs of two different programs as the input for another program (without using temporary files)?</p>
  
  <p>Ideally, I'd do this (without using temporary files):</p>
  
  <p><strong>./progA > tmpA; 
  ./progB > tmpB; paste tmpA tmpB</strong></p>
  
  <p>This seems to come up relatively frequently for me, but I can't figure out how to use the output from two different programs (<strong>progA</strong> and <strong>progB</strong>) as input to another without using temporary files (<strong>tmpA</strong> and <strong>tmpB</strong>). </p>
  
  <p>For commands like paste, simply using <strong>paste $(./progA) $(./progB)</strong> (in bash notation) won't do the trick, because it can read from files or stdin.</p>
  
  <p>The reason I'm wary of the temporary files is that I don't want to have jobs running in parallel to cause problems by using the same file; ensuring a unique file name is sometimes difficult.</p>
  
  <p>I'm currently using bash, but would be curious to see solutions for any Unix shell.</p>
  
  <p>And most importantly, am I even approaching the problem in the correct way?</p>
  
  <p><br>
  Cheers!</p>