2 ms·
Of course, the command evokes an association with the Unix tee command which fulfills a similar purpose: you can use it to pipe the output of some other command
by kleiba 6y ago
Of course, the command evokes an association with the Unix tee command which fulfills a similar purpose: you can use it to pipe the output of some other command into a file while having it be printed to stdout at the same time. So, for instance:
grep "error\|warning" log.txt | tee /tmp/issues.txt
would find mentions of the terms "error" and "warning" in a file and both print them to the terminal window as well as write them to the file /tmp/issues.txt. This can be quite handy at times.
According to Wikipedia, the name "tee" is a reference to a T-splitter used in plumbing, which makes sense.