curl -K command outputs weird symbols instead of downloading URL from file
Hello,
I'm on Ubuntu 11.04. I have read around about how to use curl to download a list of URLs from a text file, and everyone says to use Code:
curl -K URLlist.txt For example, I have a text file "test.txt" with one line in the following format: Code:
url = "http://www.example.com/image.jpg" Code:
curl -K test.txt Code:
��`s:O��n�*n�9 t��jI|y��yt{H�m5; 9/u�Ҭ��W���.�`�D�#�T������̹��'�_�r��䷻�6��;==ѥ��_��Y��k�; c�v��Y���e��pax��w�?#-+��w��;+���S���=|�� g�%�wد��Q��V��D�gY{#q��.vF�dX�`*,��<�_R���m��z-�z���g$�d����W����~ܸ��_����篍h��O� |
Curl is not a download mgr.
The -K switch allows curl to read from a config file. If you want a download mgr use wget gwget firefox extension fetch axle or a host of others. You can use curl to see where a file is. http://linux.die.net/man/1/curl |
Instead of curl, you can use wget. Like this:
Code:
wget -i file-with-urls |
Quote:
|
"curl -K" doesn't create files, it writes the downloaded data to stdout.
The data might have not been text, which explains the funny characters. |
You specify an URL, but no output file. So curl writes the downloaded file to the standard output, which will obviously produce weird symbols in case of a JPEG-file.
|
I found that curl has the "--remote-name-all" option, which causes it to create files named like the remote files and download to them.
Try this: Code:
curl --remote-name-all -K URLlist.txt |
Quote:
|
All times are GMT -5. The time now is 04:08 PM. |