I've got some semicolon separated data. The first column shows fixed time steps. In the second and third column you can see data which is partially incomplete:
Input.txt
14.09.2016:00:00:00;;100
14.09.2016:00:00:01;-1;
14.09.2016:00:00:02;0;300
14.09.2016:00:00:03;;
14.09.2016:00:00:04;;
14.09.2016:00:00:05;;
14.09.2016:00:00:06;4;
14.09.2016:00:00:07;;
14.09.2016:00:00:08;;
14.09.2016:00:00:09;16;307
How can I do a local linear interpolation for each column between those data points with empty values using awk or gawk?:
Output.txt
14.09.2016:00:00:00;-2;100
14.09.2016:00:00:01;-1;200
14.09.2016:00:00:02;0;300
14.09.2016:00:00:03;1;301
14.09.2016:00:00:04;2;302
14.09.2016:00:00:05;3;303
14.09.2016:00:00:06;4;304
14.09.2016:00:00:07;8;305
14.09.2016:00:00:08;12;306
14.09.2016:00:00:09;16;307
There already is an gawk script which only does a global interpolation for each column over the first an the last data point available here: Using awk to interpolate data column based in a data file with date and time