[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Adding MD5 to Image...



> But the fix is trivial:
> 
> $ mkisofs ... | tee >(md5sum >&2) | cdrecord

That "fix" is unneeded :)  because md5sum writes the sum to stdout,
which already goes into cdrecord, so no need to redirect stderr as well.
I tried

bash -c 'echo bla | tee >(md5sum)' | od -tc

There are 2 processes (tee, md5sum) mixing their stdout into the stdin
for cdrecord. What concerns me a little is buffer flush timing: when
the tee terminates, the md5sum terminates too. Which process gets its
buffer flushed (into cdrecord) first? Is that guaranteed? (Out of
interest, how/why?)

The original 3-liner was

    mkfifo /tmp/pipe
    md5sum </tmp/fifo&
    mkisofs ... | tee -a /tmp/pipe | cdrecord

which does not feed the output of md5sum into cdrecord (it needs to be
in a script for that), hence I said the bash 1-liner isn't equivalent.

Volker

-- 
Volker Kuhlmann			is possibly list0570 with the domain in header
http://volker.dnsalias.net/		Please do not CC list postings to me.



Reply to: