I wanted to know how to define the input file for wget, in order to download several files and set a custom name for them, using wget -i filename
Analog example using -O
wget -O customname url
-O filename
works only when you give it a single URL.
With multiple URLs, all downloaded content ends up in filename
.
You can use a while...loop
:
cat urls.txt | while read url
do
wget "$url" -O "${url##*/}" # <-- use custom name here
done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With