I have line like as a parameter for my script
 first element,second element,asd,452
and I want to split it into array to get
 first element
 second element
 asd
 452
and be able to access them like array[1]
How can I achieve this?
EDIT:
now I'm trying
while IFS='' read -r line || [[ -n "$line" ]]; do
 echo "Text read from file: $line"
 IFS=, read -ra arr <<< $line
 for x in $arr
  do
    echo "$x"
  done   
done < "$1"
my file http://pastebin.com/b4RYvUvv
 
    