title: Is it possible to simultaneously pipe the output of a tar command to a split command and md5sum check?
body: <p>I have a compression command which I pipe to a md5sum check command as such:</p>
  
  <pre><code>   tar zcvpf file.tar.gz file | xargs -I '{}' bash -c "test -f '{}' &amp;&amp; md5sum '{}'" | tee file_mybackup.md5
  </code></pre>
  
  <p>I would now like to split the tar.gz file into 100MB chunks. I can do this by:</p>
  
  <pre><code>   tar zcvpf - file | split -d -b 1M - file.tar.gz.
  </code></pre>
  
  <p>Is there a way that I can pipe the output of the tar command to simultaneously perform the split command and md5sum check? I know that split does not output to STDOUT so I can't pipe from the split command to the md5sum command.
  I tried to use a named pipe:</p>
  
  <pre><code>    mkfifo newpipe
  
      tar zcvpf - file | tee newpipe | split -d -b 1M - file.tar.gz. &amp;
  
      cat newpipe | xargs -I '{}' bash -c "test -f '{}' &amp;&amp; md5sum '{}'" | tee file_mybackup.md5
  </code></pre>
  
  <p>However this fails to output the md5sum output. Any help would be appreciated</p>