diff --git a/check-status b/check-status index 477e577..55bbd61 100644 --- a/check-status +++ b/check-status @@ -216,9 +216,9 @@ PROTOCOLS=$(printf "\\|%s" "${!HANDLERS[@]}") PROTOCOLS=${PROTOCOLS:2} check(){ + # NOTE: we are preserving whitespace here... local comment=`sed \ -e 's/^\(.*\)\('"$PROTOCOLS"'\):\/\/.*$/\1/' \ - -e 's/^\s*//;s/\s*$//' \ <<<$1` local target=`sed \ -e 's/^.*\s*\(\('"$PROTOCOLS"'\):\/\/\)/\1/' \ @@ -249,7 +249,7 @@ for site in ${SITES[@]} ; do IFS=$'\n' \ res=($(check "$site")) - comment=${res[0]/COMMENT=/} + comment="${res[0]/COMMENT=/}" site=${res[1]/URL=/} res=${res[2]/RESPONSE=/} diff --git a/update-status b/update-status index 8c3a4a2..ec6d5fd 100644 --- a/update-status +++ b/update-status @@ -63,7 +63,7 @@ cp -f "$CONFIG" "$CONFIG".bak ./check-status "$line" \ | tee -a $TEXT_STATUS \ | sed \ - -e 's/^\(.*\)\(ERROR.*$\)/\1**\2**/' \ + -e 's/^\(.*\)\(ERROR.*$\)/\1**\2**/' \ -e 's/^/#/' done echo "#_(checked on: ${DATE})_"