From 03ec57a0549969d08c110c0e72fa7c0a8699901f Mon Sep 17 00:00:00 2001 From: David Kerr Date: Sun, 29 Jan 2017 00:05:59 -0500 Subject: [PATCH] Change from ((i++)) to i=$(_math $i + 1) --- dnsapi/dns_freedns.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dnsapi/dns_freedns.sh b/dnsapi/dns_freedns.sh index 6c19fba9..c41218e1 100755 --- a/dnsapi/dns_freedns.sh +++ b/dnsapi/dns_freedns.sh @@ -81,8 +81,8 @@ dns_freedns_add() { i=0 found=0 while [ $i -lt $lines ]; do - ((i++)) - line="$(echo "$subdomain_csv" | cut -d "$nl" -f $i)" + i=$(_math $i + 1 ) + line="$(echo "$subdomain_csv" | cut -d "$nl" -f $i)" tmp="$(echo "$line" | cut -d ',' -f 1)" if [ $found = 0 ] && _startswith "$tmp" "$top_domain"; then # this line will contain DNSdomainid for the top_domain @@ -213,8 +213,8 @@ dns_freedns_rm() { i=0 found=0 while [ $i -lt $lines ]; do - ((i++)) - line="$(echo "$subdomain_csv" | cut -d "$nl" -f $i)" + i=$(_math $i + 1 ) + line="$(echo "$subdomain_csv" | cut -d "$nl" -f $i)" dns_href="$(echo "$line" | cut -d ',' -f 2)" tmp=${dns_href#*>} DNSname=${tmp%%<*}