所以我有一个小 bash 脚本:
for store in {4..80}
do
for page in {1..200}
do
curl 'https://website.com/shop.php?store_id='$store'&page='$page'&PHPSESSID=sessionID' -O
done
done
Run Code Online (Sandbox Code Playgroud)
该脚本可以运行,但是会依次下载 4-80 号所有商店的所有 200 个商店页面,这需要大量时间。(注意 bash 变量存储和卷曲 URL 中的页面)
我的目标是为每个商店/页面同时运行尽可能多的curl请求,而不是一个接一个地运行它,以节省时间。
这可能吗?