Subject: Where should progress(1) write?
To: None <tech-userlevel@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-userlevel
Date: 01/13/2006 20:12:16
progress(1) normally prints the progress bar on stdout.  It has recently
grown a "-e" option to make it print the progress bar to stderr.

In response to my question in src-changes, Tim Rightnour wrote:
> On 13-Jan-2006 Alan Barrett wrote:
> > s this the right thing?  Would it make sense to have more options to
> > control where the output is written (/dev/tty, stderr, stdout), and
> > is stdout really the correct default?
>
> Yeah, I do think it is the correct thing.  It doesn't seem
> particularly useful to me to have it go anywhere other than stdout or
> stderr.  For most cases of where progress is used, stdout probably is
> the correct default..  Putting it in pipelines like this is rather a
> corner case, but a reasonable request to have supported.

Well, I think that stderr would be the right default, and I can't easily
think of a case where I'd want progress(1) to write to stdout.  I can
easily think of cases where I'd want output to /dev/tty (so stdout and
stderr can be reserved for use by the command spawned by progress).

BTW, dd(1) has a progress option that prints dots to stderr.

--apb (Alan Barrett)
--apb (Alan Barrett)