From bfb91dee36fecfa6121bd794a66d01fbe9544ebd Mon Sep 17 00:00:00 2001 From: Aaron Johnon Date: Wed, 21 Jul 2021 04:13:35 -0500 Subject: [PATCH] Just found out herestrings aren't POSIX. Removed. --- http_check_telegram | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http_check_telegram b/http_check_telegram index 451013b..e7c79f0 100755 --- a/http_check_telegram +++ b/http_check_telegram @@ -46,7 +46,7 @@ send_message() { } get_http_code() { - if host $(awk '{gsub("https?://|/.*","")}1' <<< $1) &>/dev/null; then + if host $(printf '%s\n' $1 | awk '{gsub("https?://|/.*","")}1') &>/dev/null; then curl -sILk --max-time $TIME $1 | grep HTTP | tail -n 1 | grep -Eo '[0-9]{3}' || printf '%s\n' 999 else printf '%s\n' 000