Browse Source

fix grep error when txt value begin with - char (#2471)

pull/2486/head
Boot Lee 5 years ago
committed by neil
parent
commit
950d024a11
  1. 2
      dnsapi/dns_ali.sh

2
dnsapi/dns_ali.sh

@ -185,7 +185,7 @@ _clean() {
return 1 return 1
fi fi
record_id="$(echo "$response" | tr '{' "\n" | grep "$_sub_domain" | grep "$txtvalue" | tr "," "\n" | grep RecordId | cut -d '"' -f 4)"
record_id="$(echo "$response" | tr '{' "\n" | grep "$_sub_domain" | grep -- "$txtvalue" | tr "," "\n" | grep RecordId | cut -d '"' -f 4)"
_debug2 record_id "$record_id" _debug2 record_id "$record_id"
if [ -z "$record_id" ]; then if [ -z "$record_id" ]; then

Loading…
Cancel
Save