#!/bin/bash list='201,204,301' IFS=,; array=(${list}) typeset -i i=0 while (( $i < ${#array[*]} )) do echo "${array[$i]}" ((i=i+1)) done;