cURL / Mailing Lists / curl-users / Single Mail

curl-users

Redirecting the stats

From: Doug McNutt <douglist_at_macnauchtan.com>
Date: Wed, 27 Nov 2002 21:15:32 -0700

It's short so here's the whole thing:

#!/bin/tcsh
# Downloads log files from ISP.
set Dest = $HOME/logs
set Source = ftp://macnauchtan.com/logs
set Report = $HOME/logs/shel_log
date >> $Report
curl -n $Source/access_log -o $Dest/access_log >> $Report
echo "access_log, zero is OK "$? >> $Report
curl -n $Source/error_log -o $Dest/error_log >> $Report
echo "error_log, zero is OK "$? >> $Report
exit

The problem is that I don't see the stats in my Report file. The date and echos come out just as I expect. The list archives seem to say that redirecting with the -o option does not affect the stats and they do not show up at the end of the actual downloads. I have tried piping stdout to a subsequent echo but that doesn't work either. If I run the script from a terminal the stats are printed there. I have also tried redirecting stderr with no luck.

I suspect it's simple but I'm baffled. Perhaps it's a MacOS neXt / Darwin / Jaguar problem.

-- 
--> If you are presented a number as a percentage, and you do not clearly understand the numerator and the denominator involved, you are surely being lied to. <--
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
Received on 2002-11-28