Created
August 1, 2019 11:19
-
-
Save knight76/e9442e9257c1539e1717eaa2d5495889 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
# read file and apply foreach. | |
# example - (curl ) | |
for i in $(cat file); do | |
curl -X GET "http://localhost/api/v1/orders/$i" -H "accept: application/json;charset=UTF-8" | |
sleep 1 | |
done | |
# example - (getting ip from ping) | |
for i in $(cat hosts); do | |
ping -c1 $i | grep bytes | grep PING | awk {'print $2 substr($3, 1, length($3)-1)'} | |
sleep 1 | |
done | |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment