bash pipe redirection gets stuck
jb.1234abcd at gmail.com
Mon Dec 3 18:09:55 UTC 2012
<long <at> rule.lv> writes:
> Dear all,
> I stumbled upon a problem where multiple pipe redirection occasionally get
> stuck when trying to get sha256 sum of a stream.
> You can try to reproduce the problem if you have /usr/ports/shells/bash
> installed (output redirection used in this command is possible only in
> Create temporary test file with command: "dd if=/dev/urandom of=/tmp/file1
> bs=1k count=10"
> And the command I'm using is:
> /usr/local/bin/bash -c 'cat /tmp/file1 | tee >(/sbin/sha256 >
> /tmp/file1.sha256) > /tmp/file1.copy' ; echo $status
Do you get stuck with this ? Does it make any difference ?
/usr/local/bin/bash -c 'cat /tmp/file1 | tee /tmp/file1.copy | /sbin/sha256 \
/tmp/file1.sha256' ; echo $status
More information about the freebsd-questions