curl 获取文件中每个.js url的源代码

6yoyoihd  于 2022-11-13  发布在  其他
关注(0)|答案(2)|浏览(175)

我有一个名为urls.txt的文件。

https://website.tld/static/main_01.js
https://website.tld/static/main_02.js
https://website.tld/static/main_03.js
....

我想要每个.js文件源在allsource.txt

详细数据:

在浏览器https://website.tld/static/main_01.js中打开此url

some programming

在浏览器https://website.tld/static/main_01.js中打开此url

some more programming

在浏览器https://website.tld/static/main_01.js中打开此url

some more more programming

所以我希望这个输出在allsource.txt

some programming
some more programming
some more more programming
uplii1fm

uplii1fm1#

我想你是想下载urls.txt中列出的所有javascript文件,并将它们连接到一个文件中。

wget -i urls.txt -O all.js
m2xkgtsf

m2xkgtsf2#

for i in $(cat urls.txt); do (curl -sk $i >> allsource.txt); done

相关问题