tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: humanize_number(3) for dd(1) summary?



On 04.12.2010 15:04, Christos Zoulas wrote:
> On Dec 4,  1:27pm, jeanyves.migeon%free.fr@localhost (Jean-Yves Migeon) wrote:
> -- Subject: Re: humanize_number(3) for dd(1) summary?
> 
> | On 04.12.2010 05:46, Christos Zoulas wrote:
> | > perhaps something else then like msgfmt="...". I don't think that dd is
> | > supposed to parse getopt like options.
> | 
> | Hmm, like it. Something along the line of:
> | 
> | $ dd if=/dev/zero of=/tmp/foo msgfmt=quiet
> | 1+0 records in
> | 1+0 records out
> | $ dd if=/dev/zero of=/tmp/foo msgfmt=human
> | 1+0 records in
> | 1+0 records out
> | 1073741824 bytes (1,0 GB) transferred in 15.701 secs (65 MB/sec)
> 
> Sure, ideally you could have a formatting string too, so that you output
> only the things you need surrounded with the strings you want:
> 
> For example the default format could be:
> 
> %I+%i records in\n
> %O+%o records out\n
> %b bytes transferred in %s secs (%p %u/sec)\n

I see; what you are suggesting is having something along the line of
strftime(3) at a command line level for dd(1), I guess? Any example I
could get inspiration from, so as to keep things consistent?

-- 
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost


Home | Main Index | Thread Index | Old Index