I'm doing some stream processing of some quite substantial files-- I was wondering if there was a way to split stdout in order to pipe to multiple programs. What I'd like to do is something like this:
bzcat some_huge_file.bz2 | (wc > wordcount, char_stats > character_statistics)
I could write this glue in something like perl or python, but it seems like there ought to be a way to do this.
Google brings me to tpipe
, but I can't find any copy of tpipe or sources (nothing local on OS X 10.8).
tee
and "process substitution". bzcat some_huge_file.bz2 | tee >(wc > wordcount) | char_stats > character_statistics