title: parse and expand interval
body: <p>In my script I need to expand an interval, e.g.:</p>
  
  <pre><code>input: 1,5-7
  </code></pre>
  
  <p>to get something like the following:</p>
  
  <pre><code>output: 1,5,6,7
  </code></pre>
  
  <p>I've found other solutions here, but they involve python and I can't use it in my script.</p>