Browse Source

SED does not like newlines, one-line the http result before working on it

pull/2384/head
FlyveHest 6 years ago
parent
commit
5492502f84
  1. 2
      dnsapi/dns_gdnsdk.sh

2
dnsapi/dns_gdnsdk.sh

@ -159,7 +159,7 @@ _successful_update() {
_findentry() {
#returns id of dns entry, if it exists
_myget "action=dns_primary_changeDNSsetup&user_domain=$_domain"
_id=$(echo "$_result" | _egrep_o "<td>$1</td>\s*<td>$2</td>[^?]*[^&]*&id=[^&]*" | sed 's/^.*=//')
_id=$(echo "$_result" | tr '\n' ' ' | _egrep_o "<td>$1</td>\s*<td>$2</td>[^?]*[^&]*&id=[^&]*" | sed 's/^.*=//')
if [ -n "$_id" ]; then
_debug "Entry found with _id=$_id"
return 0

Loading…
Cancel
Save