I have financial price data in a csv file, a typical line of which looks like this:
2012-06-06 18:00:00,2012-06-06 19:00:00,4,2012-06-06 14:00:00,4,1644.8005,1644.8,1631.232,1632.266,7353,TRUE
and I would like to conditionally replace, in this particular example, the contents of column 7 with that of column 6 such that columns 6 and 7 both contain the same value.
The file line numbers on which such conditional operations should be completed are to be read from a separate text file ( let's call it "line_index_file" which is output from another program, Octave ) and this looks, for example, like this:
which means the above operations should only be applied to lines 100 and 125 of the original data file.
How would I do this with either sed or awk?