Hi,
As far as I understand, all operators (commands) in the pipeline start running in parallel.
I wonder if this approach can cause file integrity problems?
(I'm aware that sed is capable of inplace editing, but GNU and non-GNU versions differ in this regard. A cross-platform solution is necessary.)
I wonder if race condition can arise, and the file might get overwritten before the reading hits the EOF?
Thanks in advance.
As far as I understand, all operators (commands) in the pipeline start running in parallel.
I wonder if this approach can cause file integrity problems?
$ sed "s/foo/bar/" /some/file | tee /some/file
(I'm aware that sed is capable of inplace editing, but GNU and non-GNU versions differ in this regard. A cross-platform solution is necessary.)
I wonder if race condition can arise, and the file might get overwritten before the reading hits the EOF?
Thanks in advance.