On 10/05/19 06:13, Ole Tange wrote: > Pádraig wrote: > > : > >> The fact that *sum would need to consume/buffer all the input would mean >> that the parallelism >> from the rest of the pipe is lost (well I suppose the process startup >> overhead is parallelized). > > Just like sort/wc and *sum if used in a pipe today: > > cat file | sha256sum | ...
Right. *sum, and wc are simple as they reduce the input to a bounded size. sort is not simple internally and must deal with writing out temp files. >> I.E. it's functionally equivalent to: >> >> Get_untrused_input > /tmp/blah >> sha256sum -c <(echo "$chksum /tmp/blah") && >> ... >> rm /tmp/blah > > Yes, except you can do it on a read-only file system and in a shell that does > not support <(). In the general case write access would probably be required, like with sort above. Note sort uses $TMPDIR if set to identify a writable file system. Re support for <(), one could use another temp file for that. cheers, Pádraig
