Deutsch   English   Français   Italiano  
<k24a1lx7l4.ln2@Telcontar.valinor>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: "Carlos E.R." <robin_listas@es.invalid>
Newsgroups: comp.os.linux.misc
Subject: Re: Are We Back to the "Wars" Now ?
Date: Sun, 24 Nov 2024 00:11:48 +0100
Lines: 57
Message-ID: <k24a1lx7l4.ln2@Telcontar.valinor>
References: <vhmn2t@dont-email.me> <vhnikj@dont-email.me>
 <vhoaau@dont-email.me> <lIqcnTlkpf_Jtd36nZ2dnZfqn_udnZ2d@earthlink.com>
 <vhp9hs2qaa@dont-email.me> <v4adnSK1nItcwNz6nZ2dnZfqnPWdnZ2d@earthlink.com>
 <vhrolujata@dont-email.me> <Oo6dnZb3z-NT6Nz6nZ2dnZfqnPednZ2d@earthlink.com>
 <vhs0vsk6ft@dont-email.me> <sh291lxvc7.ln2@Telcontar.valinor>
 <8dd3cea92696338fe22c059158645628@msgid.frell.theremailer.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net czFlttsgdD9dmCd52ObvNA4y6NSD9SkzvImqBoz9XRcBE9HvZc
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:kmim9aKNfADut317UpzEVeGxG9Y= sha256:UxnPk58+NtKjmbr8o4aRze0z+lb75UJ/CQmhXGnB71I=
User-Agent: Mozilla Thunderbird
Content-Language: es-ES, en-CA
In-Reply-To: <8dd3cea92696338fe22c059158645628@msgid.frell.theremailer.net>
Bytes: 2758

On 2024-11-23 22:32, Fritz Wuehler wrote:
> Carlos E.R. <robin_lis...@es.invalid> [CE]:
> CE> I dd a hard disk partition, compress it, and at the same time
> CE> calculate a checksum.
> CE>
> CE>     mkfifo mdpipe
> CE>     dd if=/dev/$1  status=progress  bs=16M | tee mdpipe | pigz -3 > $3.gz &
> CE>     md5sum -b mdpipe | tee -a md5checksum_expanded
> CE>     wait
> CE>     rm mdpipe
> CE>     echo "$3" >> md5checksum_expanded
> 
> 
> David B Rosen has written the tpipe(1) utility for exactly such cases:
> 
> The above steps can be rewritten in a much cleaner way as:
> 
>    dd if=/dev/$1  status=progress  bs=16M |
>    tpipe "md5sum -b >> md5checksum_expanded" |
>    pigz -3 > $3.gz
> 
> 
> If tpipe is not available on your system, 

it is not.

Telcontar:~ # tpipe
If 'tpipe' is not a typo you can use command-not-found to lookup the 
package that contains it, like this:
     cnf tpipe
Telcontar:~ # cnf tpipe
  tpipe: command not found
Telcontar:~ # opi tpipe
Searching repos for: tpipe
1. inputpipe
2. socketpipe
3. inputpipe-debuginfo
4. socketpipe-debuginfo
5. inputpipe-debugsource
6. socketpipe-debugsource
Pick a number (0 to quit): 0
Telcontar:~ #


> you can always use the shell's
> process substitution feature instead:
> 
>    dd if=/dev/$1  status=progress  bs=16M |
>    tee >(md5sum -b >> md5checksum_expanded) \
>        >(pigz -3 > $3.gz) \
>        >/dev/null
> 

I like my way, it is mine :-)

-- 
Cheers, Carlos.