From f90ded5c62e17f43c2211da5fae2c9693441b053 Mon Sep 17 00:00:00 2001 From: piefke84 Date: Sun, 5 Mar 2023 14:21:00 +0100 Subject: [PATCH] fixed jq issue with piping --- dyndns.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dyndns.sh b/dyndns.sh index 1504821..2412886 100755 --- a/dyndns.sh +++ b/dyndns.sh @@ -141,7 +141,7 @@ if [[ "${record_id}" = "" ]]; then logger Error "HTTP Response ${http_code} - Aborting run to prevent multipe records." exit 1 else - record_id=$(echo ${record_zone} | jq | sed '$d' | jq --raw-output '.records[] | select(.type == "'${record_type}'") | select(.name == "'${record_name}'") | .id') + record_id=$(echo ${record_zone} | jq . -M | sed '$d' | jq --raw-output '.records[] | select(.type == "'${record_type}'") | select(.name == "'${record_name}'") | .id') fi fi