Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while :;do
- code=$(curl -s -I http://192.168.0.25/descarga.html | grep ^HTTP | cut -d " " -f 2)
- if [ ${#code} -eq 0 ];then
- echo "$(date) - response: inalcanzable" >> http_status.log
- sleep 2
- continue
- fi
- if [[ $code -lt 200 ]] || [[ $code -gt 299 ]];then
- echo "$(date) - response: $code" >> http_status.log
- fi
- sleep 2
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement