dnsapi/dns_dp.sh: shellcheck: fix 1 occurence of SC2126

shellcheck message was:
"Consider using grep -c instead of grep | wc"
This commit is contained in:
Bastian Bittorf
2017-01-09 15:08:41 +01:00
parent f3c937f9ed
commit 3b67cf4378
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ existing_records() {
fi
if _contains "$response" "Action completed successful"; then
count=$(printf "%s" "$response" | grep '<type>TXT</type>' | wc -l | tr -d ' ')
count=$(printf "%s" "$response" | grep -c '<type>TXT</type>' | tr -d ' ')
record_id=$(printf "%s" "$response" | grep '^<id>' | tail -1 | cut -d '>' -f 2 | cut -d '<' -f 1)
_debug record_id "$record_id"
return 0