cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Curl in loop not working

From: Sagar Saibi <sagar.saibi_at_patni.com>
Date: Thu, 11 Aug 2005 10:05:32 +0530

I am sure that there is no error in the script.
I am using curl for last 14 months and even I came across such thing for the
first time.
Following is the code :-

links - This file has the links and filenames

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

-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se]On Behalf Of Bill Mercer
Sent: Wednesday, August 10, 2005 9:29 PM
To: curl-users_at_cool.haxx.se
Subject: Re: Curl in loop not working

There's probably an error in your script. It's hard to guess what it
could be without seeing it though.

>Hi,
>
> I have number of links which I want to capture. I am using a Unix
shell
>script to capture these links.
> I have loop in which I read one link at a time from a file and
pass it
>to curl.
> Curl captures the file which is of around 320+ MB , but when it
goes to
>capture the next link it changes the earlier captured file to 1KB size
file.
> I have also tried moving the file to some other location before
the next
>curl statement.
> But still the file got changed to 1KB size file.
> If I curl only one file I get a proper 320MB file.
>
> Can someone help me?
> Thanks in advance.
>
>Thanks
>Sagar S
>
>
>http://www.patni.com
>World-Wide Partnerships. World-Class Solutions.
>_____________________________________________________________________
>
>This e-mail message may contain proprietary, confidential or legally
>privileged information for the sole use of the person or entity to
>whom this message was originally addressed. Any review,
e-transmission
>dissemination or other use of or taking of any action in reliance
upon
>this information by persons or entities other than the intended
>recipient is prohibited. If you have received this e-mail in error
>kindly delete this e-mail from your records. If it appears that this
>mail has been forwarded to you without proper authority, please
notify
>us immediately at netadmin_at_patni.com and delete this mail.
>_____________________________________________________________________

Cheers,

Bill Mercer - National Center for Construction Education and Research
3600 NW 43rd St
Gainesville, Florida 32606
http://www.nccer.org
Phone 352-334-0911 Fax 352-334-0932
=============================================

http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at netadmin_at_patni.com and delete this mail.
_____________________________________________________________________
Received on 2005-08-11