Skip to main content
added 149 characters in body; edited tags
Source Link

How to iterate file which is commahas comma separated by value ?

I tried the following:

$ cat file |tr'| tr ',''\n'>'  '\n' > /tmp/f1
$ while read -r line;do 
   echo $line;
done<done < /tmp/f1

How can i iterate over the first line contents without the creation of temporary file?

Any ideas?

How to iterate file which is comma separated by value ?

cat file |tr',''\n'>/tmp/f1
while read -r line;do echo $line;
done</tmp/f1

How to iterate file which has comma separated by value ?

I tried the following:

$ cat file | tr ','  '\n' > /tmp/f1
$ while read -r line;do 
   echo $line;
done < /tmp/f1

How can i iterate over the first line contents without the creation of temporary file?

Any ideas?

improve title
Source Link
muru
  • 78.1k
  • 16
  • 213
  • 319

How to iterate file which is comma separated by value ?

How to iterate file which is comma separated by value ?

cat file |tr',''\n'>/tmp/f1
while read -r line;do echo $line;
done</tmp/f1

How to iterate file which is comma separated by value ?

cat file |tr',''\n'>/tmp/f1
while read -r line;do echo $line;
done</tmp/f1

How to iterate file which is comma separated by value ?

cat file |tr',''\n'>/tmp/f1
while read -r line;do echo $line;
done</tmp/f1

HOW TO ITERATE FILE How to iterate a CSV file in bash?

Source Link
Loading