I seem to faintly remember some unix command that allows you to save out put while piping to the next program.
Eg.
echo "hello world!" \
| mystery_command hello.txt \
| sed -E "s/hello/goodbye/g" \
> goodbye.txt
Would both create a file called hello.txt with "hello world!" as contents. and a file called goodbye.txt with "goodbye world!" as contents.
I believe you are thinking of tee(1)
.