Smooth communication depends on both sides agreeing on a common protocol. Not all programs operate in a line based fashion like cat. For example, if you're having md5sum read its data from stdin (instead of supplying a list of filenames), it is reading the entire input (which may include newlines), then prints the digest of that data to stdout, and quits. IOW, simply replacing cat with md5sum in the code above can't work.
If you let us in on what you're ultimately trying to achieve, we might be able to provide better assistance... :)
In reply to Re^3: Pipe autoflush
by almut
in thread Pipe autoflush
by Zielony
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |