title: Parse comma separated string of numbers into variables (scripting) bash
body: <p>The post marked as duplicate above is similar, however is not sufficient for the use case. The below answers show a minimalist use of the read command to put parsed input for a known length of delimiter separated values into helpfully-named variables. For instance, if I read all four vars into $STATEMENTS,$BRANCHES,$FUNCTIONS,$LINES - a loop is not ideal as it adds a minimal of loop index awareness or 4 more lines to put each array var into a helpfully named var. </p>
  
  <p>I have a list of comma separated numbers in a file:</p>
  
  <p>26.16,6.89,23.82,26.17</p>
  
  <p>I'd like to read these 4 numbers into helpfully named separate variable names - there will never fewer or more than 4 numbers.</p>
  
  <p>Thanks for any help!</p>