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

Re: md5/sha1/rmd160 patch



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