Subject: Re: bug#12489: inconsistent output from 'dd' w/rt stats and suppression.

From: Linda Walsh <[email-masked]>
Date: Sun, 23 Sep 2012 14:02:40 -0700

It is being called from a program to copy text to a file as root.

It's not running shell.

I wanted to leave stderr for ERROR's and turn off statistics...

Maybe Unix needs to add a STDSTAT on FD3?

1/2 :-)  (i.e. there are a few instances where a stat line separate from
and error line would be handy).

Like running FLAC -- first they came out with a --silent to silence
statistic... but then that was too much.

So then they add a --totally-silent.  And guess what! 
They still issue warnings about things that don't prevent correct
encoding.  If you have MS-metadata in your WAV's, flac will complain whether
you tell it to ignore it or you don't.  If you don't ignore it and try to
explicitly include it as data in 'passthrough', it warns you that this 
option is
experimental.  If you don't use that option, it tells you it found such 
data and
to use passthrough!!!

What part of "--totally silent", especially after they already broke 
--silent,
did they not understand?  ARG!!!  So
back to dd...

It's a unix util.   Generally, quiet is beautiful.  It means everything went
well.  That's generally been the unix motto (apart from deliberate silencing
switches, which are intended to ignore error conditions).  So why not make
no xfer really not put out ANY xfer stats (as records in/out are xfer 
statistics)?

Then add another option (or vice versa -- add another to shut both up, 
whatever), like nosummary, or noIO to skip the records I/O...
Could even (in copious spare time, I'm sure, through in a format facility
like 'DATE'... for the output format (like BASH does with HISTTIMEFORMAT):
 "%i records in, %I partial\n"%o records out, %O partial\n%b total bytes 
(%{HB}) in %{H:+%H hours, }%{M:+%M minutes, }%{S:+%S seconds}, %{XPS}" 
(speed/rate)

But I shouldn't have to turn off all errors (close STDERR) just to shut up
the chit-chat (silence is beautiful!)

[email-masked] wrote:
> dd if=/dev/zero of=/tmp/foo count=1024 2>/dev/null || echo "dd fail"
> Gilles
>