Skip to content

Instantly share code, notes, and snippets.

View myvcc657's full-sized avatar

Taofiq Hidayat myvcc657

View GitHub Profile
@myvcc657
myvcc657 / parallel_curl.sh
Last active October 20, 2017 20:06 — forked from CMCDragonkai/parallel_curl.sh
Bash: GNU Parallel with Curl
# do it once
seq 1 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'"
# do it twice
seq 2 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'"
# do it 4 times, but at 2 a time
seq 4 | parallel -n0 -j2 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'"
# you can also put all your commands into a file
Xendtfiles
Pebaki