Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
449f00f9
Commit
449f00f9
authored
Nov 18, 2020
by
jakelamotta
Browse files
Add double quotes to variables
parent
8e64329d
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_simply.sh
View file @
449f00f9
...
@@ -69,26 +69,25 @@ dns_simply_rm() {
...
@@ -69,26 +69,25 @@ dns_simply_rm() {
return
1
return
1
fi
fi
records
=
$(
echo
"
$response
"
|
tr
'{'
"
\n
"
|
grep
'record_id\|type\|data\|\name'
|
sed
's/\"record_id/;\"record_id/'
)
records
=
$(
echo
"
$response
"
|
tr
'{'
"
\n
"
|
grep
'record_id\|type\|data\|\name'
|
sed
's/\"record_id/;\"record_id/'
|
tr
"
\n
"
' '
|
tr
-d
' '
|
tr
';'
' '
)
record_array
=
$(
echo
$records
|tr
-d
' '
|
tr
';'
' '
)
nr_of_deleted_records
=
0
nr_of_deleted_records
=
0
_info
"Fetching txt record"
_info
"Fetching txt record"
for
record
in
$record
_array
;
do
for
record
in
$record
s
;
do
_debug record
"
$record
"
_debug record
"
$record
"
record_data
=
$(
echo
$record
|
cut
-d
","
-f
3 |
sed
's/"//g'
|
grep
"data"
|
cut
-d
":"
-f
2
)
record_data
=
$(
echo
"
$record
"
|
cut
-d
","
-f
3 |
sed
's/"//g'
|
grep
"data"
|
cut
-d
":"
-f
2
)
record_type
=
$(
echo
$record
|
cut
-d
","
-f
4 |
sed
's/"//g'
|
grep
"type"
|
cut
-d
":"
-f
2
)
record_type
=
$(
echo
"
$record
"
|
cut
-d
","
-f
4 |
sed
's/"//g'
|
grep
"type"
|
cut
-d
":"
-f
2
)
_debug2 record_data
"
$record_data
"
_debug2 record_data
"
$record_data
"
_debug2 record_type
"
$record_type
"
_debug2 record_type
"
$record_type
"
if
[
"
$record_data
"
=
"
$txtvalue
"
]
&&
[
"
$record_type
"
=
"TXT"
]
;
then
if
[
"
$record_data
"
=
"
$txtvalue
"
]
&&
[
"
$record_type
"
=
"TXT"
]
;
then
record_id
=
$(
echo
$record
|
cut
-d
","
-f
1 |
grep
"record_id"
|
cut
-d
":"
-f
2
)
record_id
=
$(
echo
"
$record
"
|
cut
-d
","
-f
1 |
grep
"record_id"
|
cut
-d
":"
-f
2
)
_info
"Deleting record
$record
"
_info
"Deleting record
$record
"
_debug2 record_id
"
$record_id
"
_debug2 record_id
"
$record_id
"
if
[
"
$record_id
"
-gt
0
]
;
then
if
[
"
$record_id
"
-gt
0
]
;
then
...
...
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