Aspects


vs


Home Page
About Us
Feedback

Cat

The cat command is a standard Unix program used to concatenate and display files

Tee

Tee is both a Linux syscall and a user program that duplicates the contents of a pipe



Others

Example

Tee then writes more data t and tries to read from the pipe then goes to sleep until cat writes more data

from question  

Weird behavior when prepending to a file with cat and tee

Redirection to the same file will create truncate the file before cat command is invoked as cat command has a higher precedence;you could avoid the same by using intermediate file and then from intermediate to actual file or you could use tee like

from question  

Redirecting the cat ouput of file to the same file

Back to Home
Data comes from Stack Exchange with CC-BY-SA-4.0