Browse Source
Fix format: use double quote to prevent globbing and word splitting
pull/701/head
csmk
8 years ago
No known key found for this signature in database
GPG Key ID: A6C7CA717170C3FD
1 changed files with
2 additions and
2 deletions
-
dnsapi/dns_knot.sh
|
|
@ -73,10 +73,10 @@ EOF |
|
|
|
_get_root() { |
|
|
|
domain=$1 |
|
|
|
i="$(echo "$fulldomain" | tr '.' ' ' | wc -w)" |
|
|
|
i=$(_math $i - 1) |
|
|
|
i=$(_math "$i" - 1) |
|
|
|
|
|
|
|
while true; do |
|
|
|
h=$(printf "%s" "$domain" | cut -d . -f $i-100) |
|
|
|
h=$(printf "%s" "$domain" | cut -d . -f "$i"-100) |
|
|
|
if [ -z "$h" ]; then |
|
|
|
return 1 |
|
|
|
fi |
|
|
|