Write output to a file while still passing it downstream.
Section: Overview and Core Patterns
Save output and continue pipeline
bash
bash
grep ERROR app.log | tee errors.txt | wc -lExplanation
`tee` is useful when debugging pipelines or capturing intermediate results.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Overview and Core Patterns