I am inserting data to a elastic search using CURL, it works fine when i insert with a fixed data. I am trying to Get Current DateTime and assign to a variable and use with the
Rather than playing with quotes inside quotes I would suggest using here-doc to get rid of all magic quoting. Use your curl like this:
curl
number=10 dt="$(date --iso-8601=seconds)" curl -XPUT 'http://localhost:9200/nondomain_order/orders/'$number -d@- <