note/tech/multi.sh
2025-11-19 10:16:05 +08:00

11 lines
303 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用curl来创建一个200个连接的并发请求地址是http://o.disbaidu.com:8080/test.bin
#!/bin/bash
for i in {1..200}
do
# 间隔1秒模拟并发请求
sleep 1
# 下载并保存文件文件名为test_$i.bin
curl -o test_$i.bin http://o.disbaidu.com:8080/test.bin &
done