Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
esp32
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitsoko services
esp32
Commits
8d6e0585
Commit
8d6e0585
authored
Jun 18, 2017
by
omwansafelix
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: directly pipe required url data to urlData.txt instead of creating json file.
parent
dddb1843
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
get_urldata.sh
Test Folder/get_urldata.sh
+11
-10
No files found.
Test Folder/get_urldata.sh
View file @
8d6e0585
#Author
:
Felix Omwansa
#Author
s: Allan Juma and
Felix Omwansa
##buildESP32_update: get data for broadcast_url from Bitsoko server
##Parsing a json response of a url to a file
...
...
@@ -34,18 +34,19 @@
echo
""
echo
"[
$0
]: creating
json
file to store response..."
echo
"[
$0
]: creating
data
file to store response..."
sleep
3
if
[
-f
test.json
]
if
[
-f
urlData.txt
]
then
rm
test.json
rm
urlData.txt
fi
#create json file to store response
echo
"
${
RESP
}
"
| jq
.
>>
test.json
echo
"[
$0
]: url data : "
jq
-r
'.[].name'
test.json
#prints value of 'name'
sleep
3
#directly pipe required url data to urlData.txt
echo
"
${
RESP
}
"
| jq
-r
'.[].name'
>>
urlData.txt
echo
""
echo
"[
$0
]: finished"
sleep
3
####
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