Added -r to jq when tr -d double-quotes

This commit is contained in:
kexkey
2019-08-30 16:38:40 -04:00
committed by kexkey
parent 1a45edf008
commit a68123630a
13 changed files with 147 additions and 166 deletions

View File

@@ -18,10 +18,10 @@ main() {
trace "[main] New msg just arrived!"
trace "[main] msg=${msg}"
cmd=$(echo ${msg} | jq ".cmd" | tr -d '"')
cmd=$(echo ${msg} | jq -r ".cmd")
trace "[main] cmd=${cmd}"
response_topic=$(echo ${msg} | jq '."response-topic"' | tr -d '"')
response_topic=$(echo ${msg} | jq -r '."response-topic"')
trace "[main] response_topic=${response_topic}"
case "${cmd}" in