Here’s a neat way to do what you want:
tcpdump -w - -U | tee somefile | tcpdump -r -
What it does:
-w -tellstcpdumpto write binary data tostdout-Utellstcpdumpto write each packet to stdout as it is received, rather than buffering them and outputting in chunksteewrites that binary data to a file AND to its ownstdout-r -tells the secondtcpdumpto get its data from itsstdin