News for hackers. Stuff that matters.
Re:Shell pipes and in-place insanity by jamesdutc on Saturday June 28, 2014 @08:02PM (#7959834)
I think this behaviour is supposed to be a feature of shell. Pipelines are executed in parallel.

Also, see `sponge` from `moreutils` (http://kitenet.net/~joey/code/moreutils/):

    $ man sponge
    ...
    sponge  reads standard input and writes it out to the specified file. 
    Un‐like a shell redirect, sponge soaks up all its input before opening the output file. 
    This allows constructing pipelines that read from and write to the same file.

There are no comments on this comment yet.