tee
Read from stdin and write to stdout and files.
$ tee
Examples
# Write to file echo "data" | tee output.txt # Append to file echo "data" | tee -a log.txt # Write to multiple files echo "data" | tee file1.txt file2.txt # With pipe cat file.txt | tee backup.txt | grep pattern
Sponsors