Created
November 2, 2017 08:08
-
-
Save kyyberi/25d557ab764a508d764341d2a7ab71bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -a arr=( "https://apinf.io:3002/apinf/management/api/v1/organizations" | |
"https://apinf.io:3002/apinf/management/api/v1/organizations/6aK5CAKQGqg7k8wub" | |
"https://apinf.io:3002/apinf/management/api/v1/organizations/zekreYMx5aXuuMJpW" | |
"https://apinf.io:3002/apinf/management/api/v1/organizations/btB3ZGMJCnnoEyyrz" | |
"https://apinf.io:3002/apinf/management/api/v1/organizations/btB3ZGMJCnnoEyyrz" | |
"https://apinf.io:3002/apinf/management/api/v1/organizations/sf3xzgosQsbPoLwnW" | |
"https://apinf.io:3002/apinf/management/api/v1/organizations/gD8wyLfkeFoH9yQLz" | |
"https://apinf.io:3002/apinf/management/api/v1/organizations?q=apinf" | |
"https://apinf.io:3002/apinf/management/api/v1/organizations?q=apinf&limit=10" | |
) | |
declare -r prefix="curl -X GET " | |
declare -r append="&api_key=YOUR-APINF-API-KEY-HERE" | |
while : | |
do | |
counter="0" | |
while [ $counter -lt 10 ] | |
do | |
sleep $[ ( $RANDOM % 3 ) + 0 ]s | |
for i in "${arr[@]}" | |
do | |
operation=$prefix$i$append | |
echo $operation | |
#RESPONSE=`$operation` | |
#echo $RESPONSE | |
cmd=$($operation > /dev/null 2>&1) | |
done | |
counter=$[$counter+1] | |
echo Round $counter | |
done | |
echo "sleeping for 10 secs" | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment