Re: output to standard error?

2001-03-20 Thread Eddy Thilleman

Hrvoje,

>> Wget sends its output to standard error. Why is that?
>
>"It seemed like a good idea."
>
>The rationale behind it is that Wget's "output" is not real output,
>more a progress indication thingie.  The real output is when you
>specify `-O -', and that goes to stdout.

I see.

>Francois Pinard once suggested that Wget prints its progress output to
>stdout, except when `-O -' is specified, when progress should go to
>stderr.  This is a bit harder to document, but is much better at
>meeting the users' expectations and not violating the Principle of
>Least Surprise.

I'm now redirecting the 'progress' output from stderr to stdout with:

wget URL '2>>&1 | tee /a' LogFile

in my script files, which works fine.

   
  (o o)
-oooO--(_)--Oooo
  email: [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
Fidonet: 2:280/5143.7







Re: output to standard error?

2001-03-20 Thread Eddy Thilleman

Andre,

>Shrug. Anyone who wants to capture the output of a program for
>unattended operation (which is what I think Eddy wants)

No, for that you can use wget's -a option.

>generally has to catch both stdout and stderr anyway. So does it
>matter much how much of it goes to stdout vs. stderr ?

>If you're doing wget > 2>&1, there's no surprise.

I use:

wget URL '2>>&1 | tee /a' LogFile

which works fine. The tee utility sends the output to stdout (which I display on 
screen) and to a logfile for later reference (for example in case of a problem, or 
to automatically - in a script - decide if the download has succeeded).

>If your shell is command.com, you might see things differently. ;-)

Luckily, command.com is not the shell I use. ;-)

   
  (o o)
-oooO--(_)--Oooo
  email: [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
Fidonet: 2:280/5143.7







Re: output to standard error?

2001-03-20 Thread Dan Harkless


Hrvoje Niksic <[EMAIL PROTECTED]> writes:
> "Eddy Thilleman" <[EMAIL PROTECTED]> writes:
> 
> > Wget sends its output to standard error. Why is that?
> 
> "It seemed like a good idea."
> 
> The rationale behind it is that Wget's "output" is not real output,
> more a progress indication thingie.  The real output is when you
> specify `-O -', and that goes to stdout.
> 
> Francois Pinard once suggested that Wget prints its progress output to
> stdout, except when `-O -' is specified, when progress should go to
> stderr.  This is a bit harder to document, but is much better at
> meeting the users' expectations and not violating the Principle of
> Least Surprise.

I'd say that's arguable.  I think it'd be more surprising for the diagnostic
output to jump from file descriptor to file descriptor depending on what
options you happened to use than for it to just be on stderr and always be
there.

---
Dan Harkless| To help prevent SPAM contamination,
GNU Wget co-maintainer  | please do not mention this email
http://sunsite.dk/wget/ | address in Usenet posts -- thank you.



Re: output to standard error?

2001-03-19 Thread Andre Majorel

On 2001-03-20 00:25 +0100, Hrvoje Niksic wrote:
> "Eddy Thilleman" <[EMAIL PROTECTED]> writes:
> 
> > Wget sends its output to standard error. Why is that?
> 
> "It seemed like a good idea."
> 
> The rationale behind it is that Wget's "output" is not real output,
> more a progress indication thingie.  The real output is when you
> specify `-O -', and that goes to stdout.
> 
> Francois Pinard once suggested that Wget prints its progress output to
> stdout, except when `-O -' is specified, when progress should go to
> stderr.

Shrug. Anyone who wants to capture the output of a program for
unattended operation (which is what I think Eddy wants)
generally has to catch both stdout and stderr anyway. So does it
matter much how much of it goes to stdout vs. stderr ?

If you're doing wget > 2>&1, there's no surprise.

If your shell is command.com, you might see things differently.
;-)

-- 
André Majorel <[EMAIL PROTECTED]>
http://www.teaser.fr/~amajorel/



Re: output to standard error?

2001-03-19 Thread Hrvoje Niksic

"Eddy Thilleman" <[EMAIL PROTECTED]> writes:

> Wget sends its output to standard error. Why is that?

"It seemed like a good idea."

The rationale behind it is that Wget's "output" is not real output,
more a progress indication thingie.  The real output is when you
specify `-O -', and that goes to stdout.

Francois Pinard once suggested that Wget prints its progress output to
stdout, except when `-O -' is specified, when progress should go to
stderr.  This is a bit harder to document, but is much better at
meeting the users' expectations and not violating the Principle of
Least Surprise.



output to standard error?

2001-03-12 Thread Eddy Thilleman

Hi!

Wget sends its output to standard error. Why is that?

This was a problem for me that prevented me from sending wgets output to the 
screen (so I see the progress in real-time of the download without effort) and to 
a log-file (for later reference/processing). I have it worked out now by sending 
the output on standard error (sterr) to standard output (stdout), where a Tee 
utility sends wgets output to the screen and to the logfile.

So my preference is that wget sends its output to stdout, instead of stderr, but 
this is not a requirement for me.

   
  (o o)
-oooO--(_)--Oooo
  email: [EMAIL PROTECTED]
 [EMAIL PROTECTED]
Fidonet: 2:280/5143.7