[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature Request shaXXXsum pipeout
From: |
Ed Neville |
Subject: |
Re: Feature Request shaXXXsum pipeout |
Date: |
Wed, 16 Dec 2020 19:44:10 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On 2020-12-16 16:06+0000, Stefan Althöfer wrote:
> I'd like to request a new --pipeout feature for shaXXXsum to allow
> on-the-fly checking of files. It should be possible to request
> shaXXXsum to pass stdin data to stdout.
>
> I'd like to do s.th. like this to avoid reading files twice from
> network or storing them locally:
> $ set -o pipefail
> $ cat network_path/big.img.gz | sha256sum --pipeout -c cs.sha256
> | gzip -d | dd of=/dev/sdx
I think you can do this with tee, which saves some duplication, perhaps
you may want to generate other sums at the same time:
$ cat /etc/fstab | tee \
>( sha256sum > fstab.sha256sum ) \
>( sha1sum > fstab.sha1sum ) \
| gzip > fstab.gz
Ed
--
Best regards,
Ed http://www.s5h.net/