gpt4 book ai didi

text - 如何 `wget` 文本文件中的 URL 列表?

转载 作者:行者123 更新时间:2023-12-03 06:43:52 27 4
gpt4 key购买 nike

假设我在一个位置有一个包含数百个 URL 的文本文件,例如

http://url/file_to_download1.gz
http://url/file_to_download2.gz
http://url/file_to_download3.gz
http://url/file_to_download4.gz
http://url/file_to_download5.gz
....

使用 wget 下载这些文件的正确方法是什么?我怀疑有一个类似 wget -flag -flag text_file.txt

的命令

最佳答案

快速 man wget 给了我以下内容:

[..]

-i file

--input-file=file

Read URLs from a local or external file. If - is specified as file, URLs are read from the standard input. (Use ./- to read from a file literally named -.)

If this function is used, no URLs need be present on the command line. If there are URLs both on the command line and in an input file, those on the command lines will be the first ones to be retrieved. If --force-html is not specified, then file should consist of a series of URLs, one per line.

[..]

所以:wget -i text_file.txt

关于text - 如何 `wget` 文本文件中的 URL 列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40986340/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com