From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_FONT_LOW_CONTRAST,HTML_IMAGE_ONLY_24,HTML_MESSAGE, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 24248 invoked from network); 26 Jun 2023 23:33:23 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 26 Jun 2023 23:33:23 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 9414440151; Tue, 27 Jun 2023 09:33:20 +1000 (AEST) Received: from mail-vk1-xa2b.google.com (mail-vk1-xa2b.google.com [IPv6:2607:f8b0:4864:20::a2b]) by minnie.tuhs.org (Postfix) with ESMTPS id 569CB40116 for ; Tue, 27 Jun 2023 09:33:16 +1000 (AEST) Received: by mail-vk1-xa2b.google.com with SMTP id 71dfb90a1353d-4715758343aso1202435e0c.1 for ; Mon, 26 Jun 2023 16:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccc.com; s=google; t=1687822395; x=1690414395; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=z95u854d63yfl5yqYI2P96M+t1CEvIIqVS33vvYrnzA=; b=ZdHqeT+ohAx52PJ4tS2pzvHposn8tRXfSKZ0vfW+LV8AdPAjZjoEIWiWwCNuECofCR NdynhUxJlGSg1TS8hGzVKmAgyg42DLzCHSjcmMw2DkA0q5Y4Q0wvpWTdITtM9uLF55Fk NxRdBMS5lpfXZdEuLHt+xgpLSGt29g294wFHs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687822395; x=1690414395; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=z95u854d63yfl5yqYI2P96M+t1CEvIIqVS33vvYrnzA=; b=FD8eRf+kNqTghRQDqqQPPbZeEbFIG3YtYKNsUZxdUbEZzEK0O9jidffG+9f7elq+rO vagVDvsBHktBA4EP8HeVbOt4G4SaeomnrYCiAej3asuWglorHad2UerpNwtipEHO3tAm Rj4KXHnIjizx59/AxISfOG96J9DiRbPQ/ZpqSv2WT4CaiI8mz5YInXMivM4dlQyvgeGz G5zqyYOymdwoWkFaEFpOe5z3jNI1oX1MMfHFnuq6wL9O6RiOX4IuxEdXV4RCsoDBjYEF AqC4sjjwz+7jnz2QsCVYpqqvlG1rS9HSf7Fx99j6TQmiIIbr3xi9QCUO89M1QZbpwMda /spQ== X-Gm-Message-State: AC+VfDy4g8s1Hgpxqwxp5V1pJAQIim6xltWSSX9ADTy29VNQ1GPetN4h W88+Lw5pkcARE0vaNhqrlWFLAuQ+LYscRWC7Ij6EpBL4DEVZWAgaofo= X-Google-Smtp-Source: ACHHUZ4iaB8Ufx7k8DXvso32+0rf4bPwHUwxT9v0tkwvbgo0YFIYdJjJGEzNxDJACqevOSyBfDA+GeE+mwJpt3NikR8= X-Received: by 2002:a1f:4597:0:b0:471:17be:ba8d with SMTP id s145-20020a1f4597000000b0047117beba8dmr14006795vka.3.1687822393852; Mon, 26 Jun 2023 16:33:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Clem Cole Date: Mon, 26 Jun 2023 19:32:37 -0400 Message-ID: To: steve jenkin Content-Type: multipart/alternative; boundary="0000000000003adc3905ff10c6c3" Message-ID-Hash: 4G7NTNPBA3VSOGK7UKL4PY5MKDGIYSM4 X-Message-ID-Hash: 4G7NTNPBA3VSOGK7UKL4PY5MKDGIYSM4 X-MailFrom: clemc@ccc.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: COFF X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [COFF] Re: Shell script advice: using 'dd' to write multiple media List-Id: Computer Old Farts Forum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --0000000000003adc3905ff10c6c3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 26, 2023 at 7:09=E2=80=AFPM steve jenkin wrote: > > > I=E2=80=99ve never figured out how to use =E2=80=98dd=E2=80=99 so it retu= rns after a single block > is written > doesn=E2=80=99t close the input, killing the pipeline, or cause the rest = of the > data > to be discarded. > The trick here is understanding how ibs & obs, EOF is handled and probably osync, then how to use iseek (iskip in modern versions). It's not that hard. Its been done many times. One of the more interesting issues with dd is most versions still are single threaded which sucks for most media - particularly f you want to stream things. There was a wonderful hack to dd done in the. early 1980s by Tapani Lindgren ddd - double dd - which used two processes and a pipe to control them, so one process was always reading while the other was writing. You can one it Volume 14, issue 85 in the comp.sources.unix archives. Years ago, I hacked up a version using threads to do the same thing with a mutex to protect everything (It ever ran on Windows at some point). =E1=90=A7 --0000000000003adc3905ff10c6c3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jun 26, 2023 at 7:09= =E2=80=AFPM steve jenkin <sj= enkin@canb.auug.org.au> wrote:


I=E2=80=99ve never figured out how to use =E2=80=98dd=E2=80=99 so it return= s after a single block is written
doesn=E2=80=99t close the input, killing the pipeline, or cause the rest of= the data
to be discarded.

The trick here is unders= tanding how ibs & obs, EOF is handled and probably osync, then how to u= se iseek (iskip in modern versions).
It's not that hard. Its=C2= =A0been done many times.=C2=A0

One of the more interes= ting issues with dd is most versions still are single threaded which sucks = for most media - particularly f you want to stream things.
There w= as a wonderful hack to dd done in the. early 1980s by Tapani Lindgren ddd -= double dd - which used two processes and a pipe to control them, so one pr= ocess was always reading while the other was writing.=C2=A0 =C2=A0You can o= ne it Volume 14, issue 85 in the comp.sources.unix archives.

Years ago, I hacked up a version using threads to do the same thing = with a mutex to protect everything (It ever ran on Windows at some point).= =C2=A0
3D""=E1=90=A7
--0000000000003adc3905ff10c6c3--