Hi - I have the below file format and i want to update a value in the line that start with C3
C1, 2,2,0,9292016_101425, 0, 9292016_101428, 0, 9292016_101428
C2, 1,2,0,9292016_101425, 0, 9292016_101428
C3, 2,2,0,9292016_101425, 0, 9292016_101428, 0, 9292016_101428
I want to update the above C3 line as below (just changed 0 to 1 in the fourth field)
C3, 2,2,1,9292016_101425, 0, 9292016_101428, 0, 9292016_101428
the problem i have is i know how to append a string to a file but i dont know how to modify a particular line content in a file.
Any help will be greatly appreciated.
Our community of experts have been thoroughly vetted for their expertise and industry experience.