title: how to group sequence of item into square brackets
body: <p>how to group sequence of item into square brackets</p>
  
  <p>for example</p>
  
  <p>List of items</p>
  
  <pre><code>cat item.txt
      sn01
      sn02
      sn03
      sn05
      sn07
      sn08
  </code></pre>
  
  <p>Desired output</p>
  
  <pre><code>sn[01-03,05,07-08]
  </code></pre>