$ URL="http://www.b10m.net";STATUS=$(HEAD -d $URL);echo "$URL: $STATUS" | mail -s "$URL checked" john@doe.invalid