curl-library
Re: ftpupload.c in SCO openserver
Date: Thu, 29 Jul 2004 09:40:08 +0200
behrouz zolfaghari wrote:
> thanks can i expect the favor to send me the script which uploads a
> file using curl and resumes the transmission in the case of
> connection fail?
You seem to be a really lazy person! What is stopping you from reading
the curl manual, google for some shell script examples and do it yourself?
The least you can do is to try it yourself before asking us to do it for
you. Having us do your job for free is just plain rude.
Anyway, here's an example of what it can look like:
---------------------------------------
#!/bin/sh
file=$1;
cnt=0
curl --upload $file ftp://ftp.thesite.com
while [ $? -ne 0 -a $cnt -lt 10 ]; do
let cnt=cnt+1
curl --upload $file --continue-at - ftp://ftp.thesite.com
done
---------------------------------------
It stops after 10 attempts.
Linus
Received on 2004-07-29