[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: md5/sha1/rmd160 patch
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: Re: md5/sha1/rmd160 patch
- From: Hannah Schröter <hannah_(_at_)_schlund_(_dot_)_de>
- Date: Thu, 25 Jul 2002 22:33:58 +0200
- Mail-followup-to: tech_(_at_)_openbsd_(_dot_)_org
- Organization: Schlund + Partner AG
Hello!
On Thu, Jul 25, 2002 at 01:12:36PM -0700, William Ahern wrote:
>[...]
>what if i wanted to do something like:
>dump -h0 -f - /home /home | bzip2 -c | md5 -P /tmp/digest | \
>curl -sS -T - ftp://ftp.com
IIRC md5 doesn't reproduce its input to stdout anyway, but outputs
only the hash, if fed from stdin.
How about
((dump -h0 -f - /home /home | bzip2 -c | tee /dev/fd/3 |
curl -sS -T - ftp://ftp.com >&4) 3>&1 | md5 >> /tmp/digest) \
4>/dev/stdout
It's a bit hacky, something like this should work.
Or use a shell like es which can specify more special pipe
constructs directly:
dump ... | bzip2 -c | tee >{md5 >> /tmp/digest} | curl ...
>[...]
Kind regards,
Hannah.
Visit your host, monkey.org