Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
f589a1d2
Unverified
Commit
f589a1d2
authored
Mar 07, 2017
by
csmk
Browse files
Fix format: use double quote to prevent globbing and word splitting
parent
9c87a589
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_knot.sh
View file @
f589a1d2
...
@@ -73,10 +73,10 @@ EOF
...
@@ -73,10 +73,10 @@ EOF
_get_root
()
{
_get_root
()
{
domain
=
$1
domain
=
$1
i
=
"
$(
echo
"
$fulldomain
"
|
tr
'.'
' '
|
wc
-w
)
"
i
=
"
$(
echo
"
$fulldomain
"
|
tr
'.'
' '
|
wc
-w
)
"
i
=
$(
_math
$i
- 1
)
i
=
$(
_math
"
$i
"
- 1
)
while
true
;
do
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
if
[
-z
"
$h
"
]
;
then
return
1
return
1
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment