curl-users
RE: Curl in loop not working
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 11 Aug 2005 23:02:52 +0200 (CEST)
Date: Thu, 11 Aug 2005 23:02:52 +0200 (CEST)
On Thu, 11 Aug 2005, Sagar Saibi wrote:
> while read link fname ; do
> curl -m 21000 -L -s -A "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
> .NET CLR 1.0.3705)" -b cookie "$link" > $fname
> mv ./$fname ./UPLOAD/$fname
> sleep 10
> done < links
First, use -o instead of >, it'll make curl not create a file at all when it
fails.
Then, use "--trace-ascii [dumpfile]" with a unique dump file for each URL
(like a number or so) and you'll get to see exactly why each failure happens.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2005-08-11