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/


Reply via email to