curl-users
RE: --stderr option when uploading / double space
Date: Tue, 19 Jun 2001 10:59:04 -0400
Guten Morgan, Mettgut!
> > This time I want to redirect the ouput of the Standart progress
meter
> > when uploading a file. This is a minor problem, so don't be rushed.
> I'm making a http-Upload (POST):
> curl -F "FILE1=@localfilename" -o "upload.result" --stderr
"upload.status"
> "http://xxx.xxx.xxx.xxx/upload/UploadExt.dll"
> No 'upload.status'-file is written.
Is your goal simply to hide the progress meter so you don't have to see
it on the screen, for example in a batch file? I use a combination of
"--silent" (to hide the progress meter) and "--show-error" to still show
errors. I would assume adding in --stderr "filename" should write out
errors (but not progress meters as they look rather strange in an output
file anyways).
If you are working with a Windows NT or 2000 (or even XP) machine and
not Win9x, you might be able to make use of command line redirection, as
follows:
To redirect stdout (but not stderr) to a file named output.txt:
curl "put your curl-parameters here" > output.txt
To redirect stdout to output.txt and stderr to error.txt:
curl "your params here" > output.txt 2> error.txt
To redirect BOTH stdout and stderr to a file named output.txt:
curl "your params here" > output.txt 2>&1
Cheers!
--Kevin
Received on 2001-06-19