There is a file with a list of links to download:

ИМЯ_1 УРЛ_1 ИМЯ_2 УРЛ_2 ........... ИМЯ_N УРЛ_N 

How can I download files with a new name via wget?

I found a solution here https://toster.ru/q/139001 but for some reason I can not execute this script on debian

    1 answer 1

    you need to form and execute commands like wget -O имя_н урл_н :

     $ cat файл | while read nl; do wget -O $n $l; done 

    to check the correctness, to not perform the download itself, insert echo between do and wget - the commands will be simply displayed on the screen:

     $ cat файл | while read nl; do echo wget -O $n $l; done 
    • Thank! Understood, the file with the list was incorrectly compiled. Everything Works - aXXy
    • The option register is important! -o sets the file name for the log, -O to save the downloaded file under a different name. - sercxjo
    • @sercxjo, thanks for your attention. indeed, it is. memory failed. - aleksandr barakin
    • @aXXy, there was an error in the response. there should be option -O , but not -o - aleksandr barakin
    • Yes, I used my options - aXXy