gpt4 book ai didi

linux - Lynx的自动化

转载 作者:太空宇宙 更新时间:2023-11-04 12:49:46 24 4
gpt4 key购买 nike

我想为研究建立一个自定义的词表,因此我要抓取特殊的网站。我想要:通过此命令从命令行使用 Lynx:

lynx -dump -listonly "example.com" | grep -E -o "http://example.com.*|http://www.example.com.*" | sort | uniq > output.txt

我不想写 5000 x 这个命令。我想使用带有网站的 .txt 文件,该文件将由 lynx 命令读取,所有“输出”都应放在一个文件中。你能帮我解决这个问题吗?我是 Linux/Ubuntu 的菜鸟,对编​​码一无所知。对不起我的语言,我是德语。

最佳答案

你的意思是像

cat yourdomains.txt | while read domain
do
lynx -dump -listonly "$domain" | \
grep -E -o "http://${domain}.*|http://www.${domain}.*"
done | sort | uniq > output.txt

?

关于linux - Lynx的自动化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37610797/

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