curl-users
Re: Pipe in the URL ?
Date: Fri, 14 Jul 2006 10:16:15 +0200
Alexander Lazic schrieb:
> Hi,
>
> On Fre 14.07.2006 02:35, www.mail wrote:
>>
>> Please could you tell me if it is possible to do something like:
>>
>> echo "http://www.somewebsite.com/" | curl --url -
>>
>> because I'd like to download a URL which is displayed by a console
>> application, without having to create an intermediate file which
>> contains the URL.
>
You can put the URLs in a "config-file", which can pe piped into curl.
They must, however, come in the form --url http://www.somewebsite.com/
Complete example:
echo --url http://www.somewebsite.com | curl --config -
This example commandline works "as is" in Linux and in Windows.
Most certainly you would also want the --remote-name option which
assures that the local files get the same names as the remote ones:
echo --url http://www.somewebsite.com | curl --remote-name --config -
Best regards,
Jochen Roderburg
ZAIK/RRZK
University of Cologne
Robert-Koch-Str. 10 Tel.: +49-221/478-7024
D-50931 Koeln E-Mail: Roderburg_at_rrz.Uni-Koeln.DE
Germany
Received on 2006-07-14