title: Use $EDITOR in the middle of a series of UNIX pipe commands
body: <p>I have a shell command that provides output that I would like to edit before piping it into another command.  This is not regular output that can easily be edited with <code>sed</code> and such.  My current approach is:</p>
  
  <pre><code>command-one &gt; tmp
  vim tmp
  command-two &lt; tmp
  rm tmp
  </code></pre>
  
  <p>I would like to avoid the unnecessary creation of a temporary file and instead do something like <code>command-one | vim - | command-two</code> but that doesn't work because the actual onscreen output of vim gets piped into the command instead of being visible for me to edit.  This works in commands like <code>git commit</code> which wait for the temp file to be written before using the result.</p>