All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
1answer
518 views

Interpolate within single quotes

I have the following: COMMENT="A random comment" TEXT_JSON='{"person" : "Jim","comment" : "$COMMENT"}' echo "$TEXT_JSON" | jq . This prints { "person": "Jim", "comment": "$...
3
votes
1answer
574 views

bash string concatenation failed

Important note: I'm using Cygwin to run this script. I got a json string by executing result=$(jq -c ".docs[$docIndex] + { \"_rev\": \"rev\" }"<<<"$fileContent") Here is the JSON I get: {"...