curl-users
Re: how to download a range into a file?
Date: Tue, 26 Nov 2002 18:35:50 +0100 (MET)
On Tue, 26 Nov 2002, Chaos Mutant§ wrote:
> I have a 4 byte text file called test.txt in C:\test\ and the text inside
> the file is "aaaa". And there's a 4 byte file test.txt in http://test.com
> too and the text inside is "abba".
>
> Is it possible to download the range 1-2 (="bb") from the remote file to
> the local file so that aaaa will become abba?
No. curl will not modify your local file according to the contents of what
you download. curl downloads the data you ask for, you do the fiddling you
need.
> I've tried the -r1-2 switch but it only outputs "bb" into the screen. I
> thought if I could use the -o switch as well but I can't use two switches
> at the same time. Am I doing something wrong or isn't this feature
> available yet?
You can _easily_ get this feature by using a curl binding for your favourite
script language, use libcurl and write your own tool that does this or even
edit the curl source code to make it do this.
I don't think this is a feature that many people are looking for and you
won't catch *me* implementing this for a very long time! ;-)
Good luck!
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- 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?palm0002enReceived on 2002-11-26