cURL / Mailing Lists / curl-users / Single Mail


RE: Redirecting stdout in Win32

From: Derek Goring <>
Date: Fri, 7 Jun 2002 08:33:36 +1200

Thank you Kevin.

Your solution of --stderr - to direct stderr to stdout, then > test.log
to direct all screen output to a log file works. And in the logfile I
get both the curl command and the error of that command. Just
what I wanted!!

In summary, here is my command line:

0601}.dbf -o remote/sub/directory/#1.dbf --std - > 20020601.log

I see the --stderr - option is actually in the manual. I read it, but
didn't understand what it meant.


On 6 Jun 2002, at 7:48, Roth, Kevin P. wrote:

> Agree with Daniel - using "> myoutput.log" should work fine. Having
> said that, I've just tested it on WinXP using the cygwin version,
> obviously not the same environment you're in.
> If you want all the output in the same file, you might try using
> "--stderr -" (to send the stderr output into the same pipe as stdout),
> and then use either "-o filename" or "> filename" to get all output
> (errors and stdout) into the same file.
> You might also try to find a copy of "tee.exe", to save the output to
> a file, and ALSO display it to the screen. Cygwin (
> has this tool built-in, and I find it quite handy.
> --Kevin
> -----Original Message-----
> From: Derek Goring []
> Sent: Wed 05-Jun-02 05:59 PM
> I'm a new user. What I want to do is really simple, but I can't find
> how to do it. I simply want to direct all output to a log file. I
> can send errors using --stderr myoutput.log but how do I redirect
> stdout? Normal piping using > myoutput.log eliminates output to the
> console, but gives an empty file. I'm using Win32 on Windows 2000.

Derek Goring
Principal Scientist
Coastal Hydrodynamics
National Institute of Water and Atmospheric Research
P O Box 8602
New Zealand
Ph: 64 3 348 8987
Fax: 64 3 348 5548


Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas --
Received on 2002-06-06