title: use gh cli to create issues list
body: <p>I am trying to create an array of opened issue numbers from GitHub. I am using the following command to pull all the opened issue numbers we have in a specific repo and label:</p>
  <p><code>issueNumList=$(gh issue list -R &lt;repo name&gt; -l &quot;label&quot; | cut -f1)</code></p>
  <p>the problem is that I am unable to read from issueNumList as a list (obviously).
  I tried making it into an array by running this command, but it gets only the first number:</p>
  <p><code>IFS=' \n' read -ra issuesArray &lt;&lt;&lt; &quot;${issueNumList[0]}&quot;</code></p>
  <p>I tried changing this command a few times but I don't see any difference in the output. this is the output I get:</p>
  <pre><code>$ echo ${issueNumList[0]}
  1684 1683 1681 1680 1679 1678 1677 1676 1675 1674 1673 1672 1671 1670 1669 1668 1667
  $ echo ${issueNumList[@]}
  1684 1683 1681 1680 1679 1678 1677 1676 1675 1674 1673 1672 1671 1670 1669 1668 1667
  $ echo &quot;${issueNumList[0]}&quot;
  1684
  1683
  1681
  1680
  1679
  1678
  1677
  1676
  1675
  1674
  1673
  1672
  1671
  1670
  1669
  1668
  1667
  $ echo ${issuesArray[@]}
  1684
  $ echo ${issuesArray[0]}
  1684
  $ echo ${issuesArray[1]}
  
  $ echo ${issuesArray[2]}
  
  </code></pre>
  <p>from these outputs, I understand that there is only one spot in the <code>issueNumList</code> and <code>issuesArray</code> and from the third output I think it means that there is \n at the end of each number.</p>