Answer the question
In order to leave comments, you need to log in
linux. Wget. How to set the name of the saved file when reading from the list?
There is a file, in it links which need to be downloaded line by line are entered. Tell me how you can set the name of the file to be saved. For example, create another file with the same number of lines as in the first one, and so that the names for the saved file would be taken from there. Or some other way.
Answer the question
In order to leave comments, you need to log in
Something like this:
#!/bin/bash
(while read url filename
do
wget $url -O $filename
done) < wget-list.txt
урл1 имя_файла1
урл2 имя_файла2
....
урлN имя_файлаN
I found a way to download files with correct names in Cyrillic from the exchanger ex.ua
wget -i file list.urls -c --content-disposition --trust-server-names=on --restrict-file-names=nocontrol
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question