2 ms·
That's a similar case, with the difference that there is a race condition here. "some chain" and "tee" are started in parallel, and it's a random process who co
by jstimpfle 10y ago
That's a similar case, with the difference that there is a race condition here. "some chain" and "tee" are started in parallel, and it's a random process who comes first: "some chain" for opening inputfile for reading, or "tee" for opening (a new file, but with the same name) it for writing.
You can provoke it by
echo a > a
(sleep 1; cat a) | tee a
very likely "a" is empty now.
- ComputerGuru 10y agoThat makes sense. Thank you. `rewrite` should work in those cases.