Fix DNS API scripts on *BSD

\n isn't available in all regex/sed
This commit is contained in:
Jeremy Knope
2017-07-26 09:44:11 -04:00
parent a6a0495392
commit 29b21b828b
5 changed files with 16 additions and 8 deletions

View File

@@ -92,7 +92,8 @@ _get_root() {
p=1
if _ad_rest GET "domain/"; then
response="$(echo "$response" | tr -d "\n" | sed 's/{/\n&/g')"
response="$(echo "$response" | tr -d "\n" | sed 's/{/\
&/g')"
while true; do
h=$(printf "%s" "$domain" | cut -d . -f $i-100)
_debug h "$h"