Explorar el Código

Removed grep -Po

Removed usage of grep -Po.
shar0119 hace 8 años
padre
commit
2310a9bbc0
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      dnsapi/dns_dynu.sh

+ 1 - 1
dnsapi/dns_dynu.sh

@@ -149,7 +149,7 @@ _get_recordid() {
     return 0
   fi
 
-  _dns_record_id=$(printf "%s" "$response" | _egrep_o "{[^}]*}" | grep "\"text_data\":\"$txtvalue\"" | grep -Po '"id":\K[0-9]+')
+  _dns_record_id=$(printf "%s" "$response" | _egrep_o "{[^}]*}" | grep "\"text_data\":\"$txtvalue\"" | _egrep_o ",[^,]*," | grep ',"id":' | tr -d ",," | cut -d : -f 2)
 
   return 0
 }