[clug] using 'dd' in a pipeline (linux Digest, Vol 143, Issue 21, Message 1)

Miles Goodhew mgoodhew at gmail.com
Mon Nov 24 04:14:52 MST 2014


I?ve been looking at deliberate MD5 collisions and went to write a simple
> script based on ?dd?, only to fall flat on my face - detecting ?end of
> file? from STDIN.

What about:

% (something) | dd iflag=nonblock | (something else)

  Sets rc != 0 on short read and you get "dd: reading `standard input':
Resource temporarily unavailable" on stdout.
  Is that the sort of thing you're after? "noctty" may have an effect too,
depending on what else is in the pipeline. Not entirely sure what you want
from the script that you're not getting from it currently (and where the
"blocks" variable comes from/is set to)


Miles Goodhew,
Executive Computer Scientist

More information about the linux mailing list