Using xargs -P
option, you can run any command in parallel:
xargs -I % -P 8 curl -X POST --header "http://localhost:5000/example"
< <(printf '%s
' {1..400})
This will run give curl
command 400 times with max 8 jobs in parallel.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…