Make sure you read the file line by line correctly using a while read construct.
while read -r line do IFS="," set -- $line echo $4 >> $1.mdwn echo "$line" done < "m4.2_testplan.csv"
set to parse the CSV. It doesn’t do a perfect job, but it’s usually ok.
In the above example I’m splitting a test description from column 4 into a file named after the id from column 1.