#!/bin/sh -e bad=0 curl --max-time 60 --verbose "$1" >state/curl-out 2>&1 || bad=1 grep -q "$togrep" state/curl-out || bad=1 if [ "$bad" -eq 1 ] ; then cat state/curl-out exit 1 fi