Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
List 基于列表的wget下载和输出_List_Wget - Fatal编程技术网

List 基于列表的wget下载和输出

List 基于列表的wget下载和输出,list,wget,List,Wget,我有如下名称和URL列表: first name http://somewhere:port/pat/of/file.mp4 second name http://somewhere:port/pat/of/file2.mp4 third name enter code here http://somewhere:port/pat/of/file3.mp4 我们如何使用wget获取这些文件,并在URL前面的行中命名每个文件 i、 e.:第三个名称将包含来自http://somewhere:p

我有如下名称和URL列表:

first name
http://somewhere:port/pat/of/file.mp4
second name
http://somewhere:port/pat/of/file2.mp4
third name 
enter code here
http://somewhere:port/pat/of/file3.mp4
我们如何使用wget获取这些文件,并在URL前面的行中命名每个文件

i、 e.:
第三个名称将包含来自
http://somewhere:port/pat/of/file3.mp4


提前谢谢

您可以尝试以下方法:

exec 4< input_file
while read name <&4 ; do
 read url <&4
 wget -O "$name" %url
done
exec 4同时读取哪个操作系统的名称?