Given the –data parameter of a curl statement:
--data '{
"collection": [
"Library"
],
"filter": "{'''target.endpointUID''':{'''$eq''': '''ABC123'''}}",
"skip": 0,
"limit": 16
}'
I’d like to replace ABC123 with the variable I want to use but I cannot figure out the correct way.
2
Answers
You can use here-document (this assumes you don’t have special characters like double quotes in $var):
You want
or, a bit clearer