小编Cur*_*yJB的帖子

循环 curl 获取请求 bash

我正在尝试自动化 curl 脚本并最终使其也循环。我发现我不能使用任何循环,例如:

for i in `cat authors`
do
    curl *line here*   "www.test.com/autors?string="$i"&proc=39"
etc
Run Code Online (Sandbox Code Playgroud)

甚至是 CURL 的 env glob 变量

有没有办法在 curl 上为一个变量循环获取请求?

curl -H "Host: www.test.com" -G "www.test.com/autors?string="author+name"&proc=39"
Run Code Online (Sandbox Code Playgroud)

我得到的只是 CURL 的流量图,没有好的结果。我正在使用 bash

bash curl control-flow

6
推荐指数
2
解决办法
1万
查看次数

标签 统计

bash ×1

control-flow ×1

curl ×1