title: variables inside CURL POST command using shell script and while loop
body: <p>Hi I have to call curl POST method for a number of records, using bash script. For that i am using while loop.
  Actual posting with hardcoded values: </p>
  
  <pre><code>curl -X POST -u user:pass --data '&lt;automation&gt;&lt;operation action="assemble" package="service Item"/&gt;&lt;/automation&gt;' http://localhost:8080/form
  </code></pre>
  
  <p><br/>
  When i try to use while loop for a set of different actions and different packages, the <code>$packagename</code> field is not working. When i use <code>$packagename</code> as a variable to package option of data section, it is not taking, since we must pass data in double quotes. (" ") It is always taking the same value which is in double quotes.
  Could someone suggest a solution for this?</p>