Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2012 18:09:27 +0000 (UTC)
From:      jb <jb.1234abcd@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: bash pipe redirection gets stuck
Message-ID:  <loom.20121203T190423-428@post.gmane.org>
References:  <23353.144.36.114.84.1354545315.squirrel@mail.rule.lv>

next in thread | previous in thread | raw e-mail | index | archive | help
 <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
> bash).
> 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

jb







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?loom.20121203T190423-428>