I am trying to fill one variable in the body of a curl request using input from stdin.
echo 123 | curl -d "{\"query\": {\"match\": {\"number\": @- }}}" -XPOST url.com
Unfortunately, the @- is not being replaced. I would like the body of the request to match the below
{
"query": {
"match": {
"number": 123
}
}
}
How can I replace the query.match.number value from the stdin?