4 ms·
I agree with you, the downvotes are unnecessary, it was actually a good question. tee actually does sorta work for this sometimes, but it’s not guaranteed to w
by HellsMaddy 4y ago
I agree with you, the downvotes are unnecessary, it was actually a good question.
tee actually does sorta work for this sometimes, but it’s not guaranteed to wait until EOF. For example I tested with a 10 line file where I ran `sort -u file.txt | tee file.txt` and it worked fine. But I then tried a large json file `jq . large.json | tee large.json` and the file was truncated before jq finished reading it.