title: How to pass bash variable to JSON
body: <p>I'm trying to write a sample script where I'm generating names like 'student-101...student-160'. I need to post JSON data and when I do, I get a JSON parse error.</p>
  
  <p>Here's my script:</p>
  
  <pre><code>name="student-10"
  
  for i in {1..1}
  do
      r_name=$name$i
      echo $r_name
      curl -i -H 'Authorization: token &lt;token&gt;' -d '{"name": $r_name, "private": true}' "&lt;URL&gt;" &gt;&gt; create_repos_1.txt
      echo created $r_name
  done
  </code></pre>
  
  <p>I always get a <code>"Problems parsing JSON"</code> error. I've tried various combination of quotes, etc but nothing seems to work!</p>
  
  <p>What am I doing wrong?</p>