如何在bash shell中执行for循环生成的curl命令?

Bis*_*ash 2 macos bash shell curl

我已经从 for 循环生成了curl 命令。

for ((i=1; i<=1000; i++)); do  
echo "curl http://example.com/page.php?page=$i"; done 
Run Code Online (Sandbox Code Playgroud)

现在它打印所需的curl 命令。我想执行curl 命令,而不是仅仅打印curl 命令。我该如何让它发挥作用?

提前致谢。

Bis*_*ash 7

我通过简单地按照 @PesaThe 的建议删除 echo 命令来解决。

for ((i=1; i<=1000; i++)); do  
curl "http://example.com/page.php?page=$i"; done 
Run Code Online (Sandbox Code Playgroud)

谢谢@PesaThe。