title: Loop through a comma-separated shell variable
body: <p>Suppose I have a Unix shell variable as below</p>
  
  <pre><code>variable=abc,def,ghij
  </code></pre>
  
  <p>I want to extract all the values (<code>abc</code>, <code>def</code> and <code>ghij</code>) using a for loop and pass each value into a procedure. </p>
  
  <p>The script should allow extracting arbitrary number of comma-separated values from <code>$variable</code>.</p>