我想创建linux shell脚本来并行运行CURL命令
例如:我有三个命令
>卷曲-s http://localhost/process.php?id=1
>卷曲-s http://localhost/process.php?id=2
>卷曲-s http://localhost/process.php?id=3
我想同时调用上面三个命令.
任何帮助表示赞赏.
最佳答案
我认为一个bash脚本如:
#!/bin/bash
curl -s http://localhost/process.php?id=1 &
curl -s http://localhost/process.php?id=2 &
curl -s http://localhost/process.php?id=3 &
但是,这将作为后台进程启动所有任务.
不知道同时启动过程有多重要.