On Tue, Jan 29, 2008 at 03:12:24PM +0100, Jim Meyering wrote:
> Rogier Wolff <[EMAIL PROTECTED]> wrote:
> > On Tue, Jan 29, 2008 at 08:01:45AM -0500, Michael Stone wrote:
> >> I figured there'd be some piece of posix at the bottom of it. :) I
> >> wonder if the documentation should better reflect that. (The info page
> >> says only that "when dd completes it outputs the final statistics; maybe
> >> something like "when dd completes normally or is killed by SIGINT it
> >> outputs the final statistics"?)
> >
> > When I use dd to fill a floppy, (I could use "cp", but dd outputs the
> > size of the data copied, which helps me verify things went as planned),
> > I want to see 1440 blocks copied.
> 
> You were reporting that this didn't work the way
> you expected:
> 
> >   $ dd if=/dev/zero | dd count=100 of=/dev/null
> 
> The real solution is just "don't do that (i.e., don't use the
> unnecessary pipe).   Do this instead:
> 
>     $ dd if=/dev/zero count=100 of=/dev/null

As reported in the original bugreport: 

"Of course, the two dd's are unneccesary, and this could be done with
one dd. In practise, the consumer (second dd) is another program that
exits when it's had enough data. The output of (the first) dd is then
used to extract the approximate amount of data copied." 

The script that, after an system-upgrade, stopped working of course
uses a different program, which I'm not sure you have. So I decided to
provide an example, for which I didn't have to provide any data files
and other "unusual" programs.

This is a simple test case, which regrettably uses a second "dd" to
limit the amount of data that can be copied. . This results in two different
possibilities if miscommunication: First someone reports seeing "100+0
records copied" from the second dd, which is of course correct, but
the bug lies in the first dd no longer reporting the amount of data
copied.

The second case, is your interpretation that one dd would be
unneccesary as it could be done with just one. 

        Roger. 


-- 
** [EMAIL PROTECTED] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement. 
Does it sit on the couch all day? Is it unemployed? Please be specific! 
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to