Last active
May 25, 2017 11:45
-
-
Save jhryniuk/3998e7b609796b9961c15fa6cd1c84b8 to your computer and use it in GitHub Desktop.
Bash script to http smoke tests :D
This file contains hidden or 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
| #!/usr/bin/env bash | |
| ADDRESSES=( | |
| 'http://www.wp.pl' #Here you insert addresses to test :D | |
| ) | |
| function checkAddress | |
| { | |
| ADDRESS=$1 | |
| if curl -Is "${ADDRESS}" | grep -q 200; then | |
| echo "${ADDRESS} ok!" | |
| else | |
| echo "${ADDRESS} fail!" | |
| exit | |
| fi | |
| } | |
| for ADDRESS in "${ADDRESSES[@]}"; do | |
| checkAddress "${ADDRESS}" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment