There is a similar post, but this one is slightly different. I have a csv file in which the second column contains some alphanumeric data. I need to delete this entire column and replace it with a new one. I need to do this for many files in the same directory. The files are named treatables-000.csv, treatables-001.csv, and so one. Here's an example : Original file:
t , group, 1
aaa, baddata1, bbb
aab, baddata1, bbc
.......
aaad baddata2 bbb
Column 2 needs to be replaced with the columnp1,p2,p3,... p20,p1,p2,..
. It should be of the same length as the original.
How can I do this using the command line? The files may all be of different length.
p1,p2,p3
and the successive values? – kos Oct 29 '15 at 0:51