Skip to content

Instantly share code, notes, and snippets.

@jhryniuk
Last active May 25, 2017 11:45
Show Gist options
  • Save jhryniuk/3998e7b609796b9961c15fa6cd1c84b8 to your computer and use it in GitHub Desktop.
Save jhryniuk/3998e7b609796b9961c15fa6cd1c84b8 to your computer and use it in GitHub Desktop.
Bash script to http smoke tests :D
#!/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