The following is my linux shell code for insert one record to ElasticSearch:
username="Tom"
curl -XPOST 'http://192.168.0.1:9200/userdb/info/1' -d '{"user":$username}'
But it didn't work, it treated $username is a string not a variable. How can I fix this please?