0

I have a CSV file called input_sheet.csv and the content in the file is:

Coulmn1,Coulmn2,Coulmn3,Coulmn4,Coulmn5,Coulmn6,Coulmn7,Coulmn8
Data1,Data2,Data3,Data4,Data5,Data6,Data7,Data8
Value1,Value2,Value3,Value4,Value5,Value6,Value7,Value8

I am reading the rows one by one in while loop and in each row i want to change "Nth" column value based on my requirement. For example:1st row 6th column,2nd row 5th column.

Could you please help out with some solution?

Thanks in advance.

Alberto Zaccagni
  • 30,779
  • 11
  • 72
  • 106
Pravin
  • 3
  • 1
  • i am using bash shell – Pravin Apr 01 '15 at 08:35
  • Why don't you use awk? But if you want pain, once you read the line into $REPLY, you can split the string with ${REPLY%..} and ${REPLY#..} until you find the column you want to change. Change it, then reassemble the line and echo it. You are done. – user1666959 Apr 01 '15 at 11:17

0 Answers0