Help in reading a cv file in bash

Hi All,

I am trying to read a .csv file which has some 6 columns.

Eg: samp.csv

one, two, three, four
six, seven, eight, nine

I used the following code,

for line in `cat samp.csv`
do
   echo "$line"
done

It displays every comma seperated values in each line like,

one,
two,
three, etc.,

But what my expected output is,

one, two, three, four
six, seven, eight, nine

Thanks in advance. :slight_smile:

This is Useless Use of Cat, read the lines like this:

while read line
do
  echo "$line"
done < samp.csv