#!/bin/bash # LISTURLS="10.233.2.221" for URL in $LISTURLS do RESULT=$(curl -sSf "$URL") if [$? -gt 0]; then echo "Result is $RESULT" fi done