Hi,
I've got what is probably quite an easy little (presumably) awk problem that I just can't seem to work out (mental block...I've already spent ages getting the data into this format!). I want to work out the difference between rows for certain columns. for example:
1359142876 RED 14 BLUE 3 GREEN 71 BLACK 65
1359135610 RED 13 BLUE 3 GREEN 71 BLACK 65
1359128178 RED 10 BLUE 3 GREEN 68 BLACK 60
1359121257 RED 8 BLUE 3 GREEN 66 BLACK 52
ETC
to
1359142876 RED 14 BLUE 3 GREEN 71 BLACK 65
1359135610 RED 1 BLUE 0 GREEN 0 BLACK 0
1359128178 RED 3 BLUE 0 GREEN 3 BLACK 5
1359121257 RED 2 BLUE 0 GREEN 2 BLACK 8
ETC
(contents of the first column doesn't matter).
The other thing is, we don't know how many columns there will be (could be additional pairs, "PINK 10" for example).
As always any help would be appreciated